Lines Matching refs:tmppath
436 char *tmppath; in fetch() local
442 tmppath = NULL; in fetch()
725 if(tmppath != NULL) in fetch()
726 free(tmppath); in fetch()
727 asprintf(&tmppath, "%.*s.fetch.XXXXXX.%s", in fetch()
729 if (tmppath != NULL) { in fetch()
730 if (mkstemps(tmppath, strlen(slash) + 1) == -1) { in fetch()
734 of = fopen(tmppath, "w"); in fetch()
735 chown(tmppath, sb.st_uid, sb.st_gid); in fetch()
736 chmod(tmppath, sb.st_mode & ALLPERMS); in fetch()
809 if (utimes(tmppath ? tmppath : path, tv)) in fetch()
810 warn("%s: utimes()", tmppath ? tmppath : path); in fetch()
860 if (tmppath != NULL && rename(tmppath, path) == -1) { in fetch()
868 unlink(tmppath ? tmppath : path); in fetch()
869 if (R_flag && tmppath != NULL && sb.st_size == -1) in fetch()
870 rename(tmppath, path); /* ignore errors here */ in fetch()
881 if (tmppath != NULL) in fetch()
882 free(tmppath); in fetch()