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