[Patch]: Last path.cc

Pierre A. Humblet pierre@phumblet.no-ip.org
Mon Apr 12 23:32:00 GMT 2004

At 11:45 PM 4/10/2004 -0400, Christopher Faylor wrote:
>On Sat, Apr 10, 2004 at 11:37:07PM -0400, Pierre A. Humblet wrote:
>>This should take care of the issues I listed yesterday evening.
>>I simply don't understand the logic in normalize_win32_path
>>well enough to touch it intelligently. 
>>So I removed the final . in the dumbest way possible
>Why do we have to remove the final dot?
>How does that jive with the goal of munging windows paths as little
>as possible.

Windows paths go through the symlink evaluation and path existence
loops as all others. Keeping the final /. causes abnormal behavior
with some symlinks (Cygwin looks for /..lnk).
Also the non-uniform normalization complicates other routines. For
example hash_path_name() contains special code to detect and remove
the final /. 

About the "normalized_path", I would still recommend replacing
get_name() by get_win32_name() in fchown32, fchmod, fstat64, facl32
and perhaps fhandler_disk_file::mmap. Otherwise making changes to the
mounts can cause calls on opened files to fail. It's also faster.

Once that is done, get_name() only remains useful in printf statements.
Its use in the virtual handlers and two other odd places can easily
be replaced by get_win32_name() (!!) too.


More information about the Cygwin-patches mailing list