Moving files between different drives (smbd/vfs-wrap.c)
Michael Gerdts
Michael.Gerdts at usa.alcatel.com
Tue Jun 26 18:34:28 GMT 2001
On Tue, Jun 26, 2001 at 08:21:44PM +0200, Uli Gruber wrote:
> In this subroutine, "result = rename(old, new);" is used to rename files.
> "rename" works fine on the save drive, but fails when "old" and "new" are on
> different drives. Is this a bug?
>
> Does anybody have an idea how to fix this?
This is a problem with the way that rename(2) works. Certain versions of
mv(1) are capable of doing the copy followed by a remove. A while back I
asked on this list whether there was any reason not to do that within the
VFS code and there was no negative response. See
http://lists.samba.org/pipermail/samba-technical/2001-May/012916.html for
details.
Mike
More information about the samba-technical
mailing list