bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBundle -initWithPath: warning


From: Sheldon Gill
Subject: Re: NSBundle -initWithPath: warning
Date: Fri, 01 Apr 2005 11:55:35 +0800
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

David Ayers wrote:
Richard Frith-Macdonald wrote:

On 2005-03-31 09:25:17 +0100 David Ayers <d.ayers@inode.at> wrote:

Richard Frith-Macdonald wrote:
[snip]


No ... but I can easily see what the problem is ... '//Local/Library' looks like a windows UNC path where 'Local' is the host and 'Library' is the share and the actual file is unspecified ... ie it would be a relative path on windows.

Absolute path, actually.

Are you sure this is the behavior we want?

My opinion is in another thread...

The UNC path seems like an absolute path to me, comparable to '/'

No ... I'm not sure ... I'm not a windows user.
I have been treating a UNC path of the form '//host/share' like a drive-relative path of the form 'C:' and assuming that it should be considered 'relative' because it specifies a dvice but not as particular location on the device. I'm pretty convinced that 'C:' or 'C:file' are relative paths and 'C:/' and 'C:/file' are absolute.

Yes, "C:file" is relative. "C:\file" is absolute. If you think of it as a forest of directory trees and the drive specifying which tree you're talking about it makes a lot more sense. If you parse out the "C:" you get "file" and "/file".

However, it may be that '//host/share' should be treated as equivalent to '//host/share/' ... and both should be treated like '/' on unix. Do you know exactly how UNC paths behave? Is //host/share the same thing as //host/share/ ?

UNC paths are always absolute so "\\host\share" and "\\host\share\" are the same. It makes more sense if you consider "C:\" a local drive specifier and "\\" the network drive specifier.

Ahm, no... I just tried a few test on XP comand line and it doesn't support UNC paths. I wasn't aware of the subtle distinction between //host/share and //host/share/ (or \\host\share and \\host\share\)

You can't change directories to a UNC path. You've got to mount it as a local drive, first: 'net use x: \\host\share'

I tried creating a directory named C: in an arbitrary path and it told me that C: already existed. Also trying to cd into either \\host\share or \\host\share\ only resulted in a message that UNC Paths are not supported by the CMD tool.

The command line looks at C: as a drive specifier and handles it accordingly. Also note that ":" is not allowed in windows filenames.

Using Start->Run (I believe it would be Run in English) with \\host\share\ and \\host\share result in opening an explorer window of the same directory. C: and C:\ behave similarly.

But this are just arbitrary tests and I don't know the details of how UNC paths are supposed to be handled and what constitutes a relative path.

UNC paths are handled by the file system layer but the DIR command is handled by the CMD.exe shell itself and that does various checks. Hence the confusion in behaviour.

The unfortunate reality is that the different commands do different checks on the path strings they are given so you end up with a variety of behaviours. Quite confusing until you go digging.




Regards,
Sheldon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]