gnustep-dev
[Top][All Lists]
Advanced

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

Path separator in NSBrowser on MinGW


From: Fred Kiefer
Subject: Path separator in NSBrowser on MinGW
Date: Sun, 28 Apr 2002 12:47:06 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:0.9.4) Gecko/20011019 Netscape6/6.2

NSBrowser and thereby any file save or open panel fail when used with
MinGW. This is caused by Mingw using "\\" as the path separator instead
of the expected "/". This could be resolved by changing the default
separator in NSBrowser to be dependent on the environment it is compiled
for. Resolving this problem in that way will almost surely require
further changes in the libraries and eventually in the applications to
make sure all path names are treated correctly.

There may be another way to achieve the same OS independence. We could
define that all file and path names inside of GNUstep libraries and
applications should be in the UNIX style and only convert the names to
the OS specific form, when we actually need to access a file. All file
names that come from the outside would first be converted with the
NSFileManager method stringWithFileSystemRepresentation:length: and this
method would convert everything into a usable Unix representation. This
is not easy for drive letters and UNC paths, but it would only have to
be resolved here and not in all application code.

What will need to be changed, if we follow the second idea? We than need
a new implementation of NSFileManager
stringWithFileSystemRepresentation:length: and this method and
fileSystemRepresentationWithPath: should be called more often in our
library code. On the other hand we might be able to drop some of the
extra code that is in the NSString file methods.




reply via email to

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