From 3b5ac2fb159a810778c7fd65b92b653d16fd86a5 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Sun, 29 May 2011 11:20:11 +0000 Subject: - Ensure export files are closed before deleting them; when in full-streaming memory mode, this prevents cancelled exports from having their file-writing thread block waiting for more input indefinitely, causing a hang. This addresses Issue #1066 --- Source/SPExportFile.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Source/SPExportFile.m') diff --git a/Source/SPExportFile.m b/Source/SPExportFile.m index 10570a71..66131139 100644 --- a/Source/SPExportFile.m +++ b/Source/SPExportFile.m @@ -98,7 +98,10 @@ - (BOOL)delete { if ((![self exportFilePath]) || (![self exportFileHandle]) || ([[self exportFilePath] length] == 0)) return NO; - + + // Ensure the file is closed to allow all processing threads to close + [self close]; + NSFileManager *fileManager = [NSFileManager defaultManager]; if ([fileManager fileExistsAtPath:[self exportFilePath]]) { -- cgit v1.2.3