This is the mail archive of the cygwin 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: Ending space in file names is stripped, "sometimes"?


Mark, Corinna,

Very sorry, looking at the cygwin mailing list archive I now
understand why Mark asked "maybe you could provide an example?".

My original email was cut off somehow just to include the attachment,
nothing more. Below is the now obsolete question, included just to
make this thread complete.

I think I got my question answered, thanks. (Even if still a bit
puzzled how Windows users can create files with ending space if
Windows API strips them, but never mind).

Looking forward to the new version of Cygwin that doesn't use the
Windows API for file access,

kent (that is saved many times a day by Cygwin, thanks, thanks, thanks!)


[Original email text that got lost]

Hi,

I have trouble with directories or files that end with a space.
Creating them from Cygwin is one problem, and also the fact some
commands ignores spaces at the ending

  % mkdir "foo "
  % touch "foo /bar "
  touch: cannot touch `foo /bar ': No such file or directory
  % touch "foo/bar "
  % find "foo"
  foo
  foo/bar
  % find "foo "
  foo 
  foo /bar
  % find "foo     "
  foo     
  foo     /bar

If I try access an existing NTFS file or directory ending in a space
using Cygwin, it fails.

Is there a way around this? This is on Windows XP and NTFS.

  % uname -a CYGWIN_NT-5.1 D4Q7C22J 1.5.24(0.156/4/2) 2007-01-31 10:57 i686 Cygwin

I *think* this is what gives me trouble with rsync 3.x (using --iconv)
backing up files from Windows to Linux, I get

  file has vanished: .....

if a directory part or the file ends with a space.

In my case the "ordinary users" of the Windows shared disk would not
even understand what I mean if I would say "don't add spaces to the
end of directory or file names" ;-)

Any help is appreciated,

kent

PS. Sorry if this is a FAQ, I have spent hours trying to search for
the answer but has so far not found anything DS.

--
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/


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