This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New rename(2) function


Eric Blake wrote:
According to Christian Franke on 8/10/2007 3:34 PM:
...
This is probably impossible in the general case, when only POSIX
compliant OS functions can be used.

For Cygwin, the attached patch for same_name() fixes the above problem.
Should also work on managed mounts.

But your suggested patch breaks in the face of hard links with different names; you would need to do the case-insensitive comparison, then if that fails, fall back on stat()-based comparison, before making the final decision.


Could you please give a brief example for hard links which make the new "same_name()" fail.


Comparing the full windows pathnames does actually not work if a directory appears below multiple (Windows-)mount points, e.g. when "subst" is used. But this IMO does not matter, because using subst breaks other things too.

Christian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]