[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>
This commit is contained in:
parent
f567750d56
commit
66262c2a71
1 changed files with 9 additions and 9 deletions
|
@ -266,18 +266,18 @@ static SandboxBroker *kSharedSandboxBroker = nil;
|
||||||
if(!_entry) {
|
if(!_entry) {
|
||||||
_entry = [self recursivePathTest:folderUrl];
|
_entry = [self recursivePathTest:folderUrl];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if(_entry) {
|
if(_entry) {
|
||||||
[storage addObject:_entry];
|
[storage addObject:_entry];
|
||||||
|
|
||||||
if(_entry.secureUrl) {
|
if(_entry.secureUrl) {
|
||||||
[_entry.secureUrl startAccessingSecurityScopedResource];
|
[_entry.secureUrl startAccessingSecurityScopedResource];
|
||||||
|
}
|
||||||
|
|
||||||
|
return CFBridgingRetain(_entry);
|
||||||
|
} else {
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return CFBridgingRetain(_entry);
|
|
||||||
} else {
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue