From f6622104bf56bd5e3151678462ee6ac12beeef97 Mon Sep 17 00:00:00 2001 From: Andy Matuschak Date: Thu, 15 Nov 2012 22:40:39 -0800 Subject: [PATCH] Fixes #221: char *oldDestinationString --- SUPipedUnarchiver.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SUPipedUnarchiver.m b/SUPipedUnarchiver.m index 08246647..e70f0797 100644 --- a/SUPipedUnarchiver.m +++ b/SUPipedUnarchiver.m @@ -51,6 +51,7 @@ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; FILE *fp = NULL, *cmdFP = NULL; + char *oldDestinationString = NULL; SULog(@"Extracting %@ using '%@'",archivePath,command); @@ -67,7 +68,7 @@ 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;