Mail Archives: cygwin/2004/12/16/09:59:59
On Wed, 15 Dec 2004 21:32:47 -0500, Christopher Faylor wrote:
>On Wed, Dec 15, 2004 at 04:04:13PM -0700, Mark Paulus wrote:
>>This patch is as trivial as I could get to allow trailing
>>dots to be used on a managed file system.
>>
>>Unfortunately, my company will not sign the waiver,
>>so I cannot sign up for any significant changes to
>>the cygwin sources. So, hopefully, this patch is
>>small enough to squeek under the limit, or it can be a
>>starting point for discussions on how to fix the original
>>problem.
>>
>> * path.cc (path_conv::check): retain trailing dots and
>> spaces for managed mounts.
>Er, this patch apparently just leaves the trailing dots in the
>"converted" path, bypassing the loop which attempts to remove them.
>That's not the way to do this. Sorry.
I am bypassing the loop which attemps to remove them, because for a
managed filesystem, I think they need to remain.
Consider the following snippets from my strace.out:
40 2418062 [main] tar 1600 normalize_posix_path: /tmp1/usr/share/sgml/Netscape_Comm._Corp. = normalize_posix_path
./usr/share/sgml/Netscape_Comm._Corp.)
40 2418102 [main] tar 1600 mount_info::conv_to_win32_path: conv_to_win32_path (/tmp1/usr/share/sgml/Netscape_Comm._Corp)
43 2418145 [main] tar 1600 set_flags: flags: binary (0x2)
47 2418192 [main] tar 1600 mount_info::conv_to_win32_path: src_path /tmp1/usr/share/sgml/Netscape_Comm._Corp, dst c:\cygmanaged\usr\share\sgml\%
4Eetscape_%43omm._%43orp, flags 0x80A, rc 0
In the above, conv_to_win32_path removes the trailing dot, which creates a directory without the trailing dot.
now, further down the strace:
265 2419810 [main] tar 1600 normalize_posix_path: src ./usr/share/sgml/Netscape_Comm._Corp./dtd
41 2419851 [main] tar 1600 cwdstuff::get: posix /tmp1
38 2419889 [main] tar 1600 cwdstuff::get: (/tmp1) = cwdstuff::get (0x22EA50,260, 1, 0), errno 0
38 2419927 [main] tar 1600 normalize_posix_path: /tmp1/usr/share/sgml/Netscape_Comm._Corp./dtd = normalize_posix_path
(./usr/share/sgml/Netscape_Comm._Corp./dtd)
39 2419966 [main] tar 1600 mount_info::conv_to_win32_path: conv_to_win32_path (/tmp1/usr/share/sgml/Netscape_Comm._Corp./dtd)
42 2420008 [main] tar 1600 set_flags: flags: binary (0x2)
47 2420055 [main] tar 1600 mount_info::conv_to_win32_path: src_path /tmp1/usr/share/sgml/Netscape_Comm._Corp./dtd, dst c:\cygmanaged\usr\share
\sgml\%4Eetscape_%43omm._%43orp%2E\dtd, flags 0x80A, rc 0
Here, tar is going to look for a directory that cygwin clearly thinks should have a dot at the end (the %2E), and it's going to fail
because it's not going to find it, since the directory was created above without the %2E.
Other than the way I proposed, I'm not sure how to fix this, since the issue seems to be that
conv_to_win32_path() needs to get the trailing dot in it's input argument, and check() is
stripping it out. The only way I can see to fix this behaviour is to leave the trailing dots
in the string. Maybe conv_to_win32_path needs to deal/strip with the trailing dots, depending
upon whether it's a managed filesystem or not?
>cgf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -