Merge pull request #630 from sparkle-project/fix-1080-build

Avoid firstObject method in order to build with older SDKs.
This commit is contained in:
Kornel committed 2015-09-26 01:18:48 +01:00
commit b746fc56bf
1 file changed
+1 -1
+1 -1
View File
@@ -645,7 +645,7 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza
#endif
if (canUseNewTrashAPI) {
trashURL = [[_fileManager URLsForDirectory:NSTrashDirectory inDomains:NSUserDomainMask] firstObject];
trashURL = [_fileManager URLForDirectory:NSTrashDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:NO error:nil];
}
if (trashURL == nil) {