Lines Matching refs:newpath
1064 char *oldpath, *newpath;
1070 newpath = get_string(NULL);
1072 logit("rename old \"%s\" new \"%s\"", oldpath, newpath);
1080 if (link(oldpath, newpath) == -1) {
1095 if (stat(newpath, &st) == -1) {
1096 if (rename(oldpath, newpath) == -1)
1108 unlink(newpath);
1111 } else if (stat(newpath, &sb) == -1) {
1112 if (rename(oldpath, newpath) == -1)
1119 xfree(newpath);
1151 char *oldpath, *newpath;
1156 newpath = get_string(NULL);
1158 logit("symlink old \"%s\" new \"%s\"", oldpath, newpath);
1159 /* this will fail if 'newpath' exists */
1163 ret = symlink(oldpath, newpath);
1168 xfree(newpath);
1174 char *oldpath, *newpath;
1178 newpath = get_string(NULL);
1180 logit("posix-rename old \"%s\" new \"%s\"", oldpath, newpath);
1184 ret = rename(oldpath, newpath);
1189 xfree(newpath);
1231 char *oldpath, *newpath;
1235 newpath = get_string(NULL);
1237 logit("hardlink old \"%s\" new \"%s\"", oldpath, newpath);
1241 ret = link(oldpath, newpath);
1246 xfree(newpath);