mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Always call stringByStandardizingPath on the resource path
stringByStandardizingPath has an interesting quirk that causes it to remove `/private` from the path if the result still indicates an existing file or directory
This commit is contained in:
committed by
probablycorey
parent
31c1a202fd
commit
82bce082ef
@@ -35,7 +35,6 @@
|
||||
_resourcePath = [atomApplication.arguments objectForKey:@"resource-path"];
|
||||
if (!alwaysUseBundleResourcePath && !_resourcePath) {
|
||||
NSString *defaultRepositoryPath = @"~/github/atom";
|
||||
defaultRepositoryPath = [defaultRepositoryPath stringByStandardizingPath];
|
||||
if ([defaultRepositoryPath characterAtIndex:0] == '/') {
|
||||
BOOL isDir = false;
|
||||
BOOL exists = [[NSFileManager defaultManager] fileExistsAtPath:defaultRepositoryPath isDirectory:&isDir];
|
||||
@@ -47,6 +46,7 @@
|
||||
if (alwaysUseBundleResourcePath || !_resourcePath) {
|
||||
_resourcePath = [[NSBundle mainBundle] resourcePath];
|
||||
}
|
||||
_resourcePath = [_resourcePath stringByStandardizingPath];
|
||||
[_resourcePath retain];
|
||||
|
||||
if (!background) {
|
||||
|
||||
Reference in New Issue
Block a user