DO NOT REPLY [Bug 3845] Make --remove-source-files remove directories too

samba-bugs at samba-bugs at
Thu Feb 22 01:13:34 GMT 2007

hashproduct+rsync at changed:

           What    |Removed                     |Added
            Summary|Add --remove-source-files   |Make --remove-source-files
                   |                            |remove directories too

------- Comment #4 from hashproduct+rsync at  2007-02-21 19:13 MST -------
A --remove-source-files option was added in 2.6.9, but it does not remove
source directories, and I would like it to remove them so that "rsync
--remove-source-files" can be used as a mv replacement.  Specifically, I would
like the sender to do the following:

(1) Remove each empty source directory as soon as the generator processes it. 
(For this to work, the generator would need to send MSG_SUCCESS after
processing a directory with no contents in the file list; maybe the
--prune-empty-dirs code could be reused to flag such directories.)

(2) After removing each source file, check whether the parent directory is
empty and in the file list.  If so, remove it and recursively consider /its/
parent for removal.

I would be satisfied if a separate option or repetition of
--remove-source-files activated this behavior.

Configure bugmail:
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

More information about the rsync mailing list