[Sandbox Broker] Greatly speed up path resolving
The fragment remover need not detect whether the given path is a folder or a file, as it is only removing hash marked fragments, not actually removing the entire filename if it's only a file and not a folder like the old versions used to. This greatly speeds up access, especially on network shares. Signed-off-by: Christopher Snowhill <kode54@gmail.com>lastfm
parent
d834819f79
commit
6ee0d8a267
|
@ -99,12 +99,6 @@ static SandboxBroker *kSharedSandboxBroker = nil;
|
|||
+ (NSURL *)urlWithoutFragment:(NSURL *)url {
|
||||
if(![url isFileURL]) return url;
|
||||
|
||||
NSNumber *isDirectory;
|
||||
|
||||
BOOL success = [url getResourceValue:&isDirectory forKey:NSURLIsDirectoryKey error:nil];
|
||||
|
||||
if(success && [isDirectory boolValue]) return url;
|
||||
|
||||
NSString *s = [url path];
|
||||
|
||||
NSRange fragmentRange = [s rangeOfString:@"#"
|
||||
|
|
Loading…
Reference in New Issue