aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/SPExportFile.m5
1 files changed, 4 insertions, 1 deletions
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]]) {