delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/07/24/04:29:50

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
Subject: Re: Ending space in file names is stripped, "sometimes"?
References: <d2abgyunqp DOT fsf AT air DOT local> <loom DOT 20080704T084927-370 AT post DOT gmane DOT org> <d2myktlwnj DOT fsf AT air DOT local>
From: Kent Boortz <kent AT mysql DOT com>
Date: Thu, 24 Jul 2008 10:29:03 +0200
In-Reply-To: <d2myktlwnj.fsf@air.local> (Kent Boortz's message of "Mon\, 07 Jul 2008 14\:13\:36 +0200")
Message-ID: <d2hcaf3cts.fsf@mysql.com>
User-Agent: Gnus/5.101 (Gnus v5.10.10) Emacs/22.1 (darwin)
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019