rename(2) errno processing

Wayne Davison wayned at samba.org
Sat Sep 25 10:09:59 MDT 2010


On Thu, Sep 23, 2010 at 6:20 AM, Jeff Fellin <jkf at research.att.com> wrote:

> The backup test was failing because it didn't create a subdirectory. In
> tracing the code I realized the problem was in robust_move() in backup.c.
> UWIN returns ENOTDIR, when the rename(2) is called when a directory
> component is not in the new pathname.


I believe that ENOTDIR should only be returned if some component in the path
exists but is not a directory.  If the path is not fully there, it should
instead return ENOENT.  For 3.0.x, I don't want to treat ENOTDIR as a valid
return because it is indicating a path failure that the 3.0.x code cannot
handle (since it doesn't try to fix conflicting backup paths).  The 3.1.0
code (in git) validates the backup paths to ensure that any conflicting bits
turn into dirs (e.g. it will avoid an accidental use of a symlink as a dir
in the path), and I'd imagine that this code should work fine in your
environment.

..wayne..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20100925/15ebca04/attachment.html>


More information about the rsync mailing list