diff --git a/SUPipedUnarchiver.m b/SUPipedUnarchiver.m index 08246647e..e70f0797d 100644 --- a/SUPipedUnarchiver.m +++ b/SUPipedUnarchiver.m @@ -51,6 +51,7 @@ - (void)extractArchivePipingDataToCommand:(NSString *)command NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; FILE *fp = NULL, *cmdFP = NULL; + char *oldDestinationString = NULL; SULog(@"Extracting %@ using '%@'",archivePath,command); @@ -67,7 +68,7 @@ - (void)extractArchivePipingDataToCommand:(NSString *)command fp = fopen([archivePath fileSystemRepresentation], "r"); if (!fp) goto reportError; - char *oldDestinationString = getenv("DESTINATION"); + oldDestinationString = getenv("DESTINATION"); setenv("DESTINATION", [[archivePath stringByDeletingLastPathComponent] fileSystemRepresentation], 1); cmdFP = popen([command fileSystemRepresentation], "w"); size_t written;