Bug 3594 - --delete doesn't delete destination files that don't exist at the source
Summary: --delete doesn't delete destination files that don't exist at the source
Status: RESOLVED WORKSFORME
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 2.6.3
Hardware: PPC Mac OS X
: P3 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-09 09:55 UTC by David Leonard
Modified: 2006-10-08 16:30 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Leonard 2006-03-09 09:55:45 UTC
Here's what I'm doing .. any thoughts?


Marketing-Station:~/Desktop Graphics$ rsync -av --delete source/ destination/
building file list ... done
created directory destination
./
.DS_Store
content/
content/.DS_Store
content/logo_green_w_tag.eps
content/logo_green_w_tag.jpg
content/logo_green_w_tag.pdf
content/logo_white_w_tag.eps
content/logo_white_w_tag.jpg
content/logo_white_w_tag.pdf

sent 1491344 bytes  received 180 bytes  2983048.00 bytes/sec
total size is 1490564  speedup is 1.00
Marketing-Station:~/Desktop Graphics$ rsync -av --delete source/ destination/
building file list ... done
rsync: delete_one: unlink "/Users/Graphics/Desktop/destination/content/logo_white_w_tag.eps" failed: Unknown error: 0 (0)
content/
content/.DS_Store

sent 12582 bytes  received 40 bytes  25244.00 bytes/sec
total size is 883907  speedup is 70.03
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-23/rsync/main.c(717)
Comment 1 Wayne Davison 2006-03-10 10:25:19 UTC
First, check the version of rsync using "rsync --version".  The error message you cited hasn't existed in rsync since 2.6.3, so I bumped the version back to that for a start.  Is this version modified by Apple?

Another question: am I to assume that logo_white_w_tag.eps was actually deleted from the source/content directory before the second transfer?

I looked at the robust_unlink() code in utils.c of the various recent versions, and I didn't see a way for the code to return an error with errno == 0 unless the actual unlink() function did this.
Comment 2 Wayne Davison 2006-10-08 16:30:13 UTC
Cannot reproduce this one, and the bug reporter is not responding to questions.