Bug 10611 - No error code returned when removing source file failed
Summary: No error code returned when removing source file failed
Status: RESOLVED FIXED
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.1.1
Hardware: All All
: P5 minor (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-16 08:28 UTC by Peter
Modified: 2014-05-25 23:02 UTC (History)
0 users

See Also:


Attachments
Patch for returning error 26, when removing source files failed. (2.28 KB, patch)
2014-05-16 08:28 UTC, Peter
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter 2014-05-16 08:28:33 UTC
Created attachment 9945 [details]
Patch for returning error 26, when removing source files failed.

When rsync is required to remove source files with --remove-source-files option and source files where not removed (eg. due to missing write permission on source dir), no error code is returned, only error message is logged:
rsync: sender failed to remove [file]: Permission denied (13)

One would expect, that user is notified by special error code, that files were tranferred succesfully, but source files were not removed as desired.

I created a small patch to fix this (see attachment).
Comment 1 Wayne Davison 2014-05-25 23:02:03 UTC
I'm making rsync exit with the standard partial-transfer error code (which always means that someone needs to check the error messages to see what actually went wrong).