delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/11/15/19:17:57

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <26364830.post@talk.nabble.com>
References: <26363833 DOT post AT talk DOT nabble DOT com> <416096c60911151427g12cc5582t6d9bbdc063c5b14a AT mail DOT gmail DOT com> <26364830 DOT post AT talk DOT nabble DOT com>
Date: Mon, 16 Nov 2009 00:16:47 +0000
Message-ID: <416096c60911151616i77f159baj945771d67777aab@mail.gmail.com>
Subject: Re: Seems like treatment of NTFS ADS (foo:bar) changed between 1.5 and 1.7 but not mentioned in What's Changed
From: Andy Koppe <andy DOT koppe AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
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

2009/11/15 aputerguy:
>> I'd suspect the support for ADSs in 1.5 was rather accidental anyway.
>> POSIX programs certainly don't know about them, and you get the rather
>> weird situation that "files" like foo:bar can be accessed but don't
>> show up in the directory they're in.
>
> Fair point. But also having 'ls -s' return '0' on a non-empty file is pretty
> weird too.

0 is the correct size, because that's the number of bytes you're gonna
be able to read from the file, and incidentally that's also what
Explorer shows. The weirdness is all on NTFS's part.


> As a total lay-person to NTFS and filesystem stuff, I would have thought
> that the thing to do would be to allow ":" to appear by escaping it "\:"
> while preserving the original 1.5 ":" behavior to allow writing/reading to
> NTFS ADS.

The 1.5 behaviour means that POSIX programs using colons in filenames
unwittingly create resource forks.


> Finally, as an aside and for my edification, if the [] is U+F034

Oops, typo: it's U+F03A, since colon is 0x3A in ASCII. As you found,
that's 'EF 80 BA' in UTF-8.


> why does
> cygwin 1.5 seem to encode it as \357\200\272

What do you mean? 1.5 doesn't know anything about Unicode filenames.

Andy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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