[bug #13728] superflous copying instead of moving

Follow-up Comment #3, bug #13728 (project mc):

Does `bar/name/' contain any entries or is it empty ? I ask this question
because of the following paragraph in the description of rename() in SUSv3:

If the old argument points to the pathname of a directory, the new argument
shall not point to the pathname of a file that is not a directory. If the
directory named by the new argument exists, it shall be removed and old
renamed to new. In this case, a link named new shall exist throughout the
renaming operation and shall refer either to the directory referred to by new
or old before the operation began. If new names an existing directory, it
shall be required to be an empty directory.

So if we have an empty destination directory we could perform an efficient
move instead of copying . It is as simple as that.


Reply to this item at:


  Message sent via/by Savannah

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