Fixing Bug #393388: Leaking NSFileManager errors

This commit is contained in:
Andy Matuschak committed 2009-08-20 23:18:15 -07:00
1 parent 090e7c0ecb
commit afe8afc41f
1 file changed
+2 -2
+2 -2
View File
@@ -235,7 +235,7 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza
NSString *tmpPath = [self _temporaryCopyNameForPath:dst];
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
if (![[NSFileManager defaultManager] movePath:dst toPath:tmpPath handler:self])
if (![[NSFileManager defaultManager] movePath:dst toPath:tmpPath handler:nil])
#else
if (![[NSFileManager defaultManager] moveItemAtPath:dst toPath:tmpPath error:NULL])
#endif
@@ -245,7 +245,7 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza
return NO;
}
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
if (![[NSFileManager defaultManager] copyPath:src toPath:dst handler:self])
if (![[NSFileManager defaultManager] copyPath:src toPath:dst handler:nil])
#else
if (![[NSFileManager defaultManager] copyItemAtPath:src toPath:dst error:NULL])
#endif