www.delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
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 |
To: | cygwin AT cygwin DOT com |
From: | Shankar Unni <shankarunni AT netscape DOT net> |
Subject: | Re: UNC Pathname Handling within Applications |
Date: | Thu, 15 Jul 2004 15:52:46 -0700 |
Lines: | 24 |
Message-ID: | <cd71s1$rbd$1@sea.gmane.org> |
References: | <20040715033232 DOT GP25893 AT eumel DOT yoo DOT local> |
Mime-Version: | 1.0 |
X-Complaints-To: | usenet AT sea DOT gmane DOT org |
X-Gmane-NNTP-Posting-Host: | adsl-68-120-146-125.dsl.snfc21.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: | <20040715033232.GP25893@eumel.yoo.local> |
Thorsten Haude wrote: > - Is there any standard way to approach this problem? Has it come up > before in other applications? I don't know why you are even trying to normalize the paths like this. Just hand the thing off to the OS. Usually, both the user and the OS know what it is they are trying to do. For your program to try to mediate between them, and try to "understand and correct" the user's request is almost always inappropriate. Don't even try to normalize "\" to "/" or vice-versa. Windows APIs (the low-level ones) know perfectly well how to handle forward-slashes as directory separators.. > - Do you know a resource which explains how Posix apps are expected to > handle paths like this? It doesn't matter. Just pass the names, as is, to the underlying OS API. POSIX specifically says that *two* leading slashes "implementation defined" behavior, and this is specifically to allow NetBIOS-like (and AFS-like) names in POSIX implementations. -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |