Path fixes, etc, to work on MINGW.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@7581 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2000-09-22 04:20:52 +00:00
parent 47eb44d12d
commit 4ae2035ea0
19 changed files with 209 additions and 93 deletions

View file

@ -1971,12 +1971,12 @@ handle_printf_atsign (FILE *stream,
/* Return a string for passing to OS calls to handle file system objects. */
- (const char*) fileSystemRepresentation
{
return [self cString];
return [[NSFileManager defaultManager] fileSystemRepresentationWithPath: self];
}
- (BOOL) getFileSystemRepresentation: (char*)buffer maxLength: (unsigned)size
{
const char* ptr = [self cString];
const char* ptr = [self fileSystemRepresentation];
if (strlen(ptr) > size)
return NO;
strcpy(buffer, ptr);
@ -2471,7 +2471,15 @@ handle_printf_atsign (FILE *stream,
return NO;
#if defined(__MINGW__)
if ([self indexOfString: @":"] != NSNotFound)
if ([self indexOfString: @":"] == NSNotFound)
{
const char *cpath = [self fileSystemRepresentation];
if (isalpha(cpath[0]) && cpath[1] == ':')
return YES;
else
return NO;
}
else
return YES;
#else
{