bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mv -f may remove the destination file


From: Paul Eggert
Subject: Re: mv -f may remove the destination file
Date: Thu, 05 May 2005 23:45:37 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

address@hidden (Bob Proulx) writes:

> I think the reason for the question might be for what purpose is the
> lstat() call there?  It is there to tell if the destination is a
> directory and if so then it converts the rename to a rename to a
> file in the subdirectory, also as required by POSIX.

There are actually two lstat calls; one for the directory, and one for
the existing-destination check.  Presumably one could be optimized
away, if someone is ambitious.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]