This is the mail archive of the
mailing list for the Cygwin project.
Re: UNC Pathname Handling within Applications
- From: Shankar Unni <shankarunni at netscape dot net>
- To: cygwin at cygwin dot com
- Date: Thu, 15 Jul 2004 15:52:46 -0700
- Subject: Re: UNC Pathname Handling within Applications
- References: <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
- 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