396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
|
if ([path hasPrefix: @"~"]) {
OFDictionary *env = [OFApplication environment];
OFString *home;
if ((home = [env objectForKey: @"HOME"]) == nil)
return nil;
[path deleteCharactersInRange: OFRangeMake(0, 1)];
[path prependString: home];
}
[path makeImmutable];
return [OFURL fileURLWithPath: path isDirectory: true];
# elif defined(OF_WINDOWS)
|
|
|
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
|
if ([path hasPrefix: @"~"]) {
OFDictionary *env = [OFApplication environment];
OFString *home;
if ((home = [env objectForKey: @"HOME"]) == nil)
return nil;
[path deleteCharactersInRange: OFMakeRange(0, 1)];
[path prependString: home];
}
[path makeImmutable];
return [OFURL fileURLWithPath: path isDirectory: true];
# elif defined(OF_WINDOWS)
|
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
|
if ([path hasPrefix: @"~"]) {
OFDictionary *env = [OFApplication environment];
OFString *home;
if ((home = [env objectForKey: @"HOME"]) == nil)
return nil;
[path deleteCharactersInRange: OFRangeMake(0, 1)];
[path prependString: home];
}
[path appendString: @"/Preferences"];
[path makeImmutable];
return [OFURL fileURLWithPath: path isDirectory: true];
|
|
|
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
|
if ([path hasPrefix: @"~"]) {
OFDictionary *env = [OFApplication environment];
OFString *home;
if ((home = [env objectForKey: @"HOME"]) == nil)
return nil;
[path deleteCharactersInRange: OFMakeRange(0, 1)];
[path prependString: home];
}
[path appendString: @"/Preferences"];
[path makeImmutable];
return [OFURL fileURLWithPath: path isDirectory: true];
|