mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-20 20:26:42 +00:00
Minor fixes for cygwin
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3580 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d4f2f56b87
commit
205e47ed25
3 changed files with 81 additions and 91 deletions
|
@ -188,7 +188,7 @@ static NSFileManager* defaultManager = nil;
|
|||
attributes:(NSDictionary*)attributes
|
||||
{
|
||||
#if defined(__WIN32__) || defined(_WIN32)
|
||||
return CreateDirectory([path cString], NULL);
|
||||
return CreateDirectory([self fileSystemRepresentationWithPath: path], NULL);
|
||||
#else
|
||||
const char* cpath;
|
||||
char dirpath[PATH_MAX+1];
|
||||
|
@ -536,7 +536,7 @@ static NSFileManager* defaultManager = nil;
|
|||
- (BOOL)fileExistsAtPath:(NSString*)path isDirectory:(BOOL*)isDirectory
|
||||
{
|
||||
#if defined(__WIN32__) || defined(_WIN32)
|
||||
DWORD res = GetFileAttributes([path cString]);
|
||||
DWORD res = GetFileAttributes([self fileSystemRepresentationWithPath: path]);
|
||||
if (res == -1)
|
||||
return NO;
|
||||
|
||||
|
@ -941,7 +941,7 @@ static NSFileManager* defaultManager = nil;
|
|||
}
|
||||
return [[NSString stringWithCString: cpath] cString];
|
||||
#else
|
||||
return [[[path copy] autorelease] cString];
|
||||
return [[[path copy] autorelease] cString];
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1091,14 +1091,15 @@ static NSFileManager* defaultManager = nil;
|
|||
|
||||
- (void)dealloc
|
||||
{
|
||||
while ([pathStack count])
|
||||
[self backtrack];
|
||||
while ([pathStack count])
|
||||
[self backtrack];
|
||||
|
||||
[pathStack release];
|
||||
[enumStack release];
|
||||
[currentFileName release];
|
||||
[currentFilePath release];
|
||||
[topPath release];
|
||||
[pathStack release];
|
||||
[enumStack release];
|
||||
[currentFileName release];
|
||||
[currentFilePath release];
|
||||
[topPath release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
// Getting attributes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue