[Sandbox Broker] Synchronize full access operation
Full access should be synchronized, otherwise rapid access to the same path from different threads will cause crashes. Signed-off-by: Christopher Snowhill <kode54@gmail.com>swiftingly
parent
f567750d56
commit
66262c2a71
|
@ -266,18 +266,18 @@ static SandboxBroker *kSharedSandboxBroker = nil;
|
|||
if(!_entry) {
|
||||
_entry = [self recursivePathTest:folderUrl];
|
||||
}
|
||||
}
|
||||
|
||||
if(_entry) {
|
||||
[storage addObject:_entry];
|
||||
if(_entry) {
|
||||
[storage addObject:_entry];
|
||||
|
||||
if(_entry.secureUrl) {
|
||||
[_entry.secureUrl startAccessingSecurityScopedResource];
|
||||
if(_entry.secureUrl) {
|
||||
[_entry.secureUrl startAccessingSecurityScopedResource];
|
||||
}
|
||||
|
||||
return CFBridgingRetain(_entry);
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return CFBridgingRetain(_entry);
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue