The Samba-Bugzilla – Bug 2676
Directory replaced by a single file cannot be deleted
Last modified: 2005-06-03 01:39:11 UTC
NB found in rsync version 2.5.5
but this version not available on the form
So this is a bit old - but could not see a similar bug in Bugzilla
I use rsync to archive a Windows machine (with SMB shares).
The Windows machine uses Zipmagic which makes ZIP
files appear as normal folders.
If Zipmagic is disabled. ZIP file becomes a normal file
(not a folder)
If I rsync again, it complains that it cannot delete the XXX.ZIP
directory (because it contains other files)
rsync does not expect a folder name to be replaced by
a normal file with the same name, i.e. it assumes the
type is the *current* type of XXX.ZIP (a folder), not the type that was last
archived (a directory) and so cannot delete it if it performs a simple single
Sounds like you failed to specify --force.