Lines Matching refs:tmppath
437 char *tmppath; in fetch() local
443 tmppath = NULL; in fetch()
726 if(tmppath != NULL) in fetch()
727 free(tmppath); in fetch()
728 asprintf(&tmppath, "%.*s.fetch.XXXXXX.%s", in fetch()
730 if (tmppath != NULL) { in fetch()
731 if (mkstemps(tmppath, strlen(slash) + 1) == -1) { in fetch()
735 of = fopen(tmppath, "w"); in fetch()
736 chown(tmppath, sb.st_uid, sb.st_gid); in fetch()
737 chmod(tmppath, sb.st_mode & ALLPERMS); in fetch()
810 if (utimes(tmppath ? tmppath : path, tv)) in fetch()
811 warn("%s: utimes()", tmppath ? tmppath : path); in fetch()
861 if (tmppath != NULL && rename(tmppath, path) == -1) { in fetch()
869 unlink(tmppath ? tmppath : path); in fetch()
870 if (R_flag && tmppath != NULL && sb.st_size == -1) in fetch()
871 rename(tmppath, path); /* ignore errors here */ in fetch()
882 if (tmppath != NULL) in fetch()
883 free(tmppath); in fetch()