diff --git a/Utils/SandboxBroker.m b/Utils/SandboxBroker.m index 24fd720ae..b53024f65 100644 --- a/Utils/SandboxBroker.m +++ b/Utils/SandboxBroker.m @@ -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; } }