Macos compatibility fix

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27736 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2009-01-30 20:08:42 +00:00
parent 5239f962dc
commit 25b8816b4d
2 changed files with 12 additions and 3 deletions

View file

@ -620,10 +620,15 @@ static unsigned urlAlign;
*/
- (id) initFileURLWithPath: (NSString*)aPath
{
BOOL flag = NO;
NSFileManager *mgr = [NSFileManager defaultManager];
BOOL flag = NO;
if ([[NSFileManager defaultManager] fileExistsAtPath: aPath
isDirectory: &flag] == YES)
if ([aPath isAbsolutePath] == NO)
{
aPath = [[mgr currentDirectoryPath]
stringByAppendingPathComponent: aPath];
}
if ([mgr fileExistsAtPath: aPath isDirectory: &flag] == YES)
{
if ([aPath isAbsolutePath] == NO)
{