mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-21 21:34:17 -04:00
Made delete_one() handle a failed rmdir on a symlink when
--keep-dirlinks was specified.
This commit is contained in:
1 parent
373ef16010
commit
566fce3237
1 file changed
+3
@@ -30,6 +30,7 @@ extern struct stats stats;
|
||||
extern int dry_run;
|
||||
extern int am_server;
|
||||
extern int relative_paths;
|
||||
extern int keep_dirlinks;
|
||||
extern int preserve_hard_links;
|
||||
extern int preserve_perms;
|
||||
extern int cvs_exclude;
|
||||
@@ -59,6 +60,8 @@ static void delete_one(char *fn, int is_dir)
|
||||
}
|
||||
} else {
|
||||
if (do_rmdir(fn) != 0) {
|
||||
if (errno == ENOTDIR && keep_dirlinks)
|
||||
return delete_one(fn, 0);
|
||||
if (errno != ENOTEMPTY && errno != EEXIST) {
|
||||
rsyserr(FERROR, errno,
|
||||
"delete_one: rmdir %s failed",
|
||||
|
||||
Reference in new issue
Block a user