search for: robust_mov

Displaying 6 results from an estimated 6 matches for "robust_mov".

Did you mean: robust_move
2010 Sep 23
2
rename(2) errno processing
...T&T Labs open source project, supporting a Unix environment on Windows. The code configured easily and compiled without any modifications or ifdef's added to the code. The backup test was failing because it didn't create a subdirectory. In tracing the code I realized the problem was in robust_move() in backup.c. UWIN returns ENOTDIR, when the rename(2) is called when a directory component is not in the new pathname. According to the Open Group website this is a valid errno value. The code in robust_move() only checked for ENOENT. When I added checking for ENOTDIR, the backup test passes. I...
2002 Dec 09
1
when using --backup-dir: why not make_bak_dir() . . .
here (in keep_backup())? --- backup.c.orig Mon Dec 9 17:02:36 2002 +++ backup.c Mon Dec 9 17:03:50 2002 @@ -273,6 +273,7 @@ /* move to keep tree if a file */ if(!kept) { + make_bak_dir(fname,backup_dir); if (!robust_move (fname, keep_name)) rprintf(FERROR, "keep_backup failed %s -> %s : %s\n", fname, keep_name, strerror(errno)); this reconstructs parent directory permissions more in keeping with my (humble) expectations, in addition to being consistent with the way all ~S_IFREG links' pare...
2004 Feb 17
1
[patch] Make robust_rename() handle EXDEV.
...ename %s -> \"%s\": %s\n", + full_fname(fnametmp), fname, strerror(errno)); } else { set_perms(fname,file,NULL,0); } patchwork diff backup.c --- backup.c 2004-02-17 09:58:51.000000000 -0500 +++ backup.c 2004-02-17 10:12:15.000000000 -0500 @@ -131,27 +131,16 @@ static int robust_move(char *src, char *dst) { int keep_trying = 4; - int keep_path_extfs = 0; int failed; while (keep_trying) { - if (keep_path_extfs) { - failed = copy_file(src, dst, 0755); - if (!failed) - do_unlink(src); - } else - failed = robust_rename(src, dst); - + failed = robust_rename(src...
2001 Sep 19
3
permissions bug w/ --backup-dir or --backup option?
Running rsync 2.4.7pre1, using the --backup-dir option, I just realized today that file ownerships and permissions of backed up files are not preserved. In other words, if rsync moves an obsolete file to the backup dir, it's ownership seems to revert to root:root, and permissions change, as well. We are also using the -a (archive) option, by the way, which should mean "preserve
2007 Apr 03
0
Modifications to NOT recursively make_backup
...rprintf(FINFO, "make_backup: RMDIR %s returns %i\n", - full_fname(fname), ret_code); - } kept = 1; } --- 204,214 ---- } if (!kept && S_ISDIR(file->mode)) { ! if (robust_move(fname, buf) != 0) { ! rsyserr(FERROR, errno, "keep_backup failed: % s -> \"%s\"", ! full_fname(fname), safe_fname(buf)); } kept = 1; }
2003 Sep 05
1
new option suggestion '--backup-only'
...| backup_only) { failed = copy_file(src, dst, 0755); + saveerrno = errno; if (!failed) { do_unlink(src); + saveerrno = errno; } } else { failed = robust_rename (src, dst); + saveerrno = errno; } if (failed) { if (verbose > 2) rprintf (FERROR, "robust_move failed: %s(%d)\n", strerror (errno), errno); + errno = saveerrno; switch (errno) { /* external filesystem */ case EXDEV: @@ -225,7 +231,8 @@ } } kept = 1; - do_unlink(fname); + if (!backup_only) + do_unlink(fname); } #endif @@ -233,11 +240,11 @@...