[Top][All Lists]

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

Re: GWorkspace issues on MinGW

From: Luke Kendall
Subject: Re: GWorkspace issues on MinGW
Date: Sat, 19 Aug 2006 10:36:57 +1000 (EST)

On 18 Aug, Enrico Sersale wrote:
>  GWorkspace has *NO* linuxisms; besides linux, it runs on darwin, *BSD, 
> solaris, etc... 
>  Here I see a problem in the "C:\DesktopNewFolder" path; there is not the 
> path separator that should be between "C:\Desktop" and "NewFolder". 
>  Usually I use -stringByAppendingPathComponent: and, in the few cases when I 
> must append a path separator by hand, I use a function that calls 
> NSFileManager's -stringWithFileSystemRepresentation:length:; this should give 
> correct paths also on windows. 
>  Anyway, not having windows, I can't test anything and it's very probable 
> that gworkspace doesn't run on it, but not due of these basical problems 
> (path handling, etc...). 

Could it be as simple as Windows' use of backslash as a path separator,
which in many contexts in C (obj-C) string handling may be interpreted
as an escape character?

In Windows, in most functions, using slash as a path separator works
just as well as backslash, and would avoid these problems.  It would
mean you'd need to detect you were on Windows and filter in place all
path strings replacing backslash with slash.

Another Windows problem likely to hurt is the CR-LF line endings on
text files, that will be stripped out and converted to LF if you open
up a file in text mode instead of binary mode.


reply via email to

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