From e7c354ce12101a18b7c6f5445190c6b1885e74ff Mon Sep 17 00:00:00 2001 From: rdoering Date: Thu, 27 Oct 2016 06:28:17 +0200 Subject: [PATCH 1/2] Describing the problem for mac-sierra --- MacPass/MPTemporaryFileStorage.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MacPass/MPTemporaryFileStorage.m b/MacPass/MPTemporaryFileStorage.m index e1b6827c..67d72a69 100644 --- a/MacPass/MPTemporaryFileStorage.m +++ b/MacPass/MPTemporaryFileStorage.m @@ -117,6 +117,13 @@ } + (void)_runCleanupForPath:(NSString *)path { + /* + * This crashes with mac 10.12.1 because the command /usr/bin/srm doesnt come with the OS. + * This leads to leaf the plain data at drive. + * + * The data should be deleted by us. Further the plain data sould never touch the drive. + */ + NSTask *task = [[NSTask alloc] init]; [task setLaunchPath:@"/usr/bin/srm"]; [task setArguments:@[@"-m", path]]; From 0acd695c5279470b3e01db206e26786c8a6cf6f6 Mon Sep 17 00:00:00 2001 From: rdoering Date: Thu, 27 Oct 2016 18:09:26 +0200 Subject: [PATCH 2/2] Fixed: Missing /usr/bin/srm is preplaced by /bin/rm -P --- MacPass/MPTemporaryFileStorage.m | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/MacPass/MPTemporaryFileStorage.m b/MacPass/MPTemporaryFileStorage.m index 67d72a69..ae00f539 100644 --- a/MacPass/MPTemporaryFileStorage.m +++ b/MacPass/MPTemporaryFileStorage.m @@ -117,16 +117,9 @@ } + (void)_runCleanupForPath:(NSString *)path { - /* - * This crashes with mac 10.12.1 because the command /usr/bin/srm doesnt come with the OS. - * This leads to leaf the plain data at drive. - * - * The data should be deleted by us. Further the plain data sould never touch the drive. - */ - - NSTask *task = [[NSTask alloc] init]; - [task setLaunchPath:@"/usr/bin/srm"]; - [task setArguments:@[@"-m", path]]; + NSTask *task = [[NSTask alloc] init]; + [task setLaunchPath:@"/bin/rm"]; + [task setArguments:@[@"-P", path]]; [task launch]; [task waitUntilExit]; }