delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/11/16/09:38:33

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Message-ID: <4B01639C.8000403@towo.net>
Date: Mon, 16 Nov 2009 15:37:16 +0100
From: Thomas Wolff <towo AT towo DOT net>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
To: cygwin AT cygwin DOT 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
References: <26363833 DOT post AT talk DOT nabble DOT com> <416096c60911151427g12cc5582t6d9bbdc063c5b14a AT mail DOT gmail DOT com> <4B013E09 DOT 1010209 AT towo DOT net> <20091116120650 DOT GH29173 AT calimero DOT vinschen DOT de> <4B01462A DOT 3080400 AT towo DOT net> <416096c60911160532j2c49cd7ftb79fcc7295f9be21 AT mail DOT gmail DOT com> <20091116135644 DOT GK29173 AT calimero DOT vinschen DOT de>
In-Reply-To: <20091116135644.GK29173@calimero.vinschen.de>
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

Corinna Vinschen wrote:
> On Nov 16 13:32, Andy Koppe wrote:
>   
>> 2009/11/16 Thomas Wolff:
>>     
>>> But with it being supported, "foo:bar" *is* a POSIX filename and can quite
>>> transparently be handled like a file
>>>       
>> If you create a file called "foo:bar" in Cygwin 1.5, a directory
>> listing will actually show a file called "foo" of size 0. You have to
>> already know that "foo:bar" exists to access it, and there's no way in
>> Cygwin to find those files.
>>
>> Furthermore, if you delete the file "foo", you'll also delete
>> "foo:bar" and any other ADSs of "foo". Again, something that POSIX
>> programs don't expect.
>>     
>
> Or, just for kicks, try to create a file "abc:def:ghi" under 1.5 or,
> FWIW, under CMD.
>   
Well, I wanted to withdraw my arguments when I read this but then I 
simply tried in 1.5 and it worked quite well...
Of course Andy is right and directory handling would have to be tweaked 
to gain maximum consistence with POSIX, e.g. removing the base file 
might have to leave a dummy empty base file if there are forks...

Isn't one of the goals of cygwin to provide a mostly POSIX-like gateway 
to Windows resources and isn't quite a lot of effort being put to this 
aim about some other features, e.g. the weird security stuff? I think 
ADS sounds easier and more worth some effort, also considering NTFS is 
not the only file system with this kind of feature (e.g. Mac forks).

Kind regards,
Thomas

>>> Moreover, this transparent mapping would also solve the copy/backup problem
>>> discussed in the other thread (was it "rsync"?) and actually all problems at
>>> once, like including these things in zip archives etc.
>>>       
>> Zip would never know about the ADSs, because they don't show up in
>> directory listings. Same in cmd.exe, btw.
>>
>> I guess they could be included in Cygwin directory listings, but
>> - It would be a chunky piece of work to implement it.
>> - It would slow down directory operations.
>> - Non-POSIX behaviours would remain: creating "foo:bar" would create
>> an empty "foo" and deleting "foo" would also delete "foo:bar" and any
>> other ADSs.
>>
>> I think they'd need a special API if they were to be supported. Do
>> they fit into the xattr stuff?
>>     
>
> No, xattrs and ADS are entirely different beasts.
>
>
> Corinna
>
>   


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