Subject: bug#20119: 25.0.50; tramp-test30-special-characters hangs on Cygwin

From: Eli Zaretskii <[email-masked]>
Date: Tue, 17 Mar 2015 17:31:32 +0200

> From: Michael Albinus <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Tue, 17 Mar 2015 15:46:26 +0100
> 
> >> (file-exists-p "~/ file name with spaces ")
> >> => t
> >> 
> >> (file-exists-p "~/ file name with spaces")
> >> => t
> >> 
> >> (directory-files "~/")
> >> => (" file name with spaces" ...)
> >
> > Where do you see errors in primitives here?  They are just
> > peculiarities of the underlying filesystem.
> >
> > Like I said: such file names should be avoided, but they are not
> > disallowed.
> 
> I do not believe it is important, but in my naive feeling
> "~/ file name with spaces " and "~/ file name with spaces" are different.
> 
> Especially, since leading spaces in file names are treated:
> 
> (file-exists-p "~/file name with spaces ")
> => nil

The Win32 file-name related APIs "normalize" whitespace, and this is
the result.  The only way to work around this is bypass the Win32
layer altogether, and work on lower levels, where many nice features
of Win32 need to be done by hand.  Too much trouble for too small a
gain, IMO.