New rename(2) function

Christian Franke Christian.Franke@t-online.de
Sat Aug 11 12:17:00 GMT 2007


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



More information about the Cygwin-developers mailing list