delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/11/15/16:52:53

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <26363833.post@talk.nabble.com>
Date: Sun, 15 Nov 2009 13:51:41 -0800 (PST)
From: aputerguy <nabble AT kosowsky DOT org>
To: cygwin AT cygwin DOT com
Subject: Seems like treatment of NTFS ADS (foo:bar) changed between 1.5 and 1.7 but not mentioned in What's Changed
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

Cygwin 1.7 seems to have lost support for NTFS Alternative Data Streams --
which it seems not to either create or read (vs. Cygwin 1.5 behavior) --
specifically,

$ echo "dog" > foo:bar
$ echo "cat" > foo:baz

$ cat foo:bar
dog

$ cat foo:baz
dog

In Cygwin 1.5
$ ls -s foo*
0 foo

$ ls -1s foo:bar
1 foo:bar

$ ls -1s foo:baz
1 foo:baz

and explorer lists a single 0 byte file

In cygwin 1.7
$ ls -1s foo*
1 foo:bar
1 foo:baz

Which might seem ok,
*But* now explorer shows two files
foo[]bar
foo[]baz
where [] is a square box indicating an illegal symbol.

Basically it seems that rather than using the NTFS ADS, that cygwin 1.7 is
treating ":" as a valid symbol for file names and is actually creating two
separate files.

Perhaps even worse, cygwin 1.7 can't seem to read NTFS ADS files created on
1.5 (nor do I see how to create NTFS ADS with 1.7)
i.e., if I create 'foo' as above on 1.5 and try to read it on 1.7, I get:

$ ls -1s foo*
0 foo

$ cat foo
$

$ cat foo:bar
cat foo:bar: No such file or directory

$ cat foo:baz
cat foo:bar: No such file or directory

Conversely, foo created in 1.7 also gives 2 separate foo???bar and foo???baz
in 1.5

So again it seems like:
1]  1.7 treats ":" like a regular filename symbol and creates a regular file
2] 1.7 can't read NTFS ADS since as above it sees ":" as just a regular
character.

I imagine this was done for POSIX compliance but does this mean that there
is no longer support for NTFS ADS and that such files are neither creatable
nor readable under 1.7?
Also, shouldn't this be documented in "What's changed"
-- 
View this message in context: http://old.nabble.com/Seems-like-treatment-of-NTFS-ADS-%28foo%3Abar%29-changed-between-1.5-and-1.7-but-not-mentioned-in-What%27s-Changed-tp26363833p26363833.html
Sent from the Cygwin list mailing list archive at Nabble.com.


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