mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-26 04:57:54 +00:00
Fixed leaks with NSFileManager
This commit is contained in:
1 parent
613b759077
commit
268ea201da
2 files changed
+3
-3
No files matched your search
@@ -67,7 +67,7 @@
|
||||
// Now that we've mounted it, we need to copy out its contents.
|
||||
if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_5) {
|
||||
// On 10.6 and later we don't want to use the File Manager API and instead want to use NSFileManager (fixes #827357).
|
||||
NSFileManager *manager = [[NSFileManager alloc] init];
|
||||
NSFileManager *manager = [[[NSFileManager alloc] init] autorelease];
|
||||
if (![manager copyItemAtPath:mountPoint toPath:[archivePath stringByDeletingLastPathComponent] error:NULL]) {
|
||||
goto reportError;
|
||||
}
|
||||
|
||||
@@ -464,7 +464,7 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza
|
||||
{
|
||||
if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_5)
|
||||
{
|
||||
NSFileManager *manager = [[NSFileManager alloc] init];
|
||||
NSFileManager *manager = [[[NSFileManager alloc] init] autorelease];
|
||||
BOOL success = [manager moveItemAtPath:dst toPath:tmpPath error:error];
|
||||
if (!success && hadFileAtDest)
|
||||
{
|
||||
@@ -489,7 +489,7 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza
|
||||
{
|
||||
if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_5)
|
||||
{
|
||||
NSFileManager *manager = [[NSFileManager alloc] init];
|
||||
NSFileManager *manager = [[[NSFileManager alloc] init] autorelease];
|
||||
BOOL success = [manager copyItemAtPath:src toPath:dst error:error];
|
||||
if (!success)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user