X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Tue, 17 Nov 2009 18:21:45 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.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
Message-ID: <20091117172145.GA30865@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <20091116120650.GH29173@calimero.vinschen.de>  <4B01462A.3080400@towo.net>  <416096c60911160532j2c49cd7ftb79fcc7295f9be21@mail.gmail.com>  <20091116135644.GK29173@calimero.vinschen.de>  <4B01639C.8000403@towo.net>  <4B0167EF.8030807@towo.net>  <20091116163415.GD20652@ednor.casa.cgf.cx>  <4B02BB32.4090403@towo.net>  <20091117151248.GC15007@ednor.casa.cgf.cx>  <4B02D31B.20603@towo.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4B02D31B.20603@towo.net>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Nov 17 17:45, Thomas Wolff wrote:
> Christopher Faylor wrote:
> >How could we possibly use '/' as a delimiter?  Are you really advocating
> >that we treat every file as a potential directory?  So every time
> >someone says "foo/bar" and "foo" is a file we try to open "foo:bar"?
> >And what happens when someone says "ls -l foo"?  Should that work too?
> I'm not really "advocating" it, it's just an idea how it could be
> handled in case support *is* desired.
> And yes, if someone *wants* access to this NTFS feature, why not
> this way? It's a trade-off - weird (but acceptable) handling for a
> weird feature.
> 
> Whether the default for ls is to show forks or not, might be
> configurable again. If it does (maybe with -l or -a or -la), it

That would even be possible via a funny, Cygwin-specific call sequence

  int fd = open ("dir", O_CYGWIN_OPEN_FOR_STREAM_LISTING);
  DIR *dir = fdopendir (fd);

but first of all, it would seriously (really, really seriously) affect
the *complexity* of the readdir() function, second, it would seriously
affect the *performance* of readdir() and ...

> could look like:
> ... foo
> ... foo/bar

... third, it's not clear to me how the path conversion function is
supposed to work.  So somebody enters "cat ~/foo/bar", the path is
converted to \??\C:\home\our_example_user\foo\bar, and the NtCreateFile
function will return STATUS_OBJECT_PATH_NOT_FOUND.  Every time that
happens we should check if replacing the last backslash with a colon
will allow to open the file?

That sounds like a big, shiny can of worms, the family pack.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

