Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
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
To: cygwin@cygwin.com
From: Shankar Unni <shankarunni@netscape.net>
Subject: Re: UNC Pathname Handling within Applications
Date: Fri, 16 Jul 2004 11:36:10 -0700
Lines: 31
Message-ID: <cd976s$kjr$1@sea.gmane.org>
References: <20040715033232.GP25893@eumel.yoo.local> <cd71s1$rbd$1@sea.gmane.org> <20040715233034.GA3729@eumel.yoo.local>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: usenet@sea.gmane.org
X-Gmane-NNTP-Posting-Host: adsl-68-122-192-48.dsl.pltn13.pacbell.net
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040626 Thunderbird/0.7.1 Mnenhy/0.6.0.101
In-Reply-To: <20040715233034.GA3729@eumel.yoo.local>

Thorsten Haude wrote:

> The path is also displayed at various places. The user might be
> surprised to see surplus slashes.

[Starting to drift OT, sorry..]

Who's generating the surplus slashes? Is this because of trailing "/" in 
paths, and you're internally compositing names somehow?

I thought the only names you would *show* to the user would be the names 
of editor buffers, etc., something which the user has already specified 
explicitly anyway. It's not like you're saying "nedit myfile", and 
you're searching all over the filesystem to locate myfile..

If the name is something the user is already specifying as a relative or 
absolute path, then there's no need to further normalize them.

If you *do* ever show to the user a path that nedit has composed itself 
(say, some property display, like "where is the foobar package that is 
automatically loaded?"), then the right thing is to only normalize *at 
the point where you do the composition*.

I.e. if you're doing "prefix + basename", then the only normalization 
should be between prefix and basename (i.e. strip trailing slashes (any 
kind) from prefix, and append a "known slash" and basename).

You shouldn't be doing any further normalization (e.g. /x/../y -> /y or 
any such), because if it *is* a synthesized name, then there's great 
value in knowing *how* the name was synthesized. Normalizing it loses 
this information.


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

