DO NOT REPLY [Bug 6307] New: --remove-source-files removes files if source and destination are the same

samba-bugs at samba-bugs at
Thu Apr 30 17:10:48 GMT 2009

           Summary: --remove-source-files removes files if source and
                    destination are the same
           Product: rsync
           Version: 3.0.5
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: core
        AssignedTo: wayned at
        ReportedBy: at
         QAContact: rsync-qa at

I wanted to move the files of a directory (whose path was only slightly
different from the current directory) to the current directory. Unfortunately,
I errorneously passed the current directory as first parameter instead of the
other one. The rsync call was rsync --append -avAHSP --remove-source-files
/path/to/current/directory/ .
The files in the current directory were deleted. I think rsync should check
whether the source and the destination files are the same (like mv does, for
instance) and in that case prevent the files from being deleted.

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