https://bugzilla.samba.org/show_bug.cgi?id=4979
Summary: readdir() failure results in remote deletes Product: rsync Version: 3.0.0 Platform: PPC OS/Version: Mac OS X Status: NEW Severity: major Priority: P3 Component: core AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] QAContact: [EMAIL PROTECTED] I'm using rsync 3.0 to duplicate one hard drive to another. Today the source drive failed, but in a way that left it appearing to be online and partially functional. When I attempted to use rsync it reported: rsync: readdir("/Volumes/KidD/."): Input/output error (5) And then proceeded to delete every file and directory on the remote volume. It appears that rsync is not handling this error properly, and that it's treating it as an empty directory. The problem is in send_directory() in flist.c. opendir() apparently worked on my bad volume but readdir() failed. I don't grok the code well enough to suggest a patch, but I see that errno gets reported at the bottom of the function but it doesn't short-circuit the remainder of the code, in the way the error handling on opendir() does earlier in the routine. Is send_if_directory() still getting called? Does this look like an empty directory to the remote rsync? rsync built with cvs root a week or two ago. rsync command: sudo ./rsync --rsync-path=/alias/upkeep/rsync --verbose --archive --xattrs --delete --stats /Volumes/KidD/ /Volumes/KidD_b/ -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact. -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html