diff options
author | rowanbeentje <rowan@beent.je> | 2011-05-29 11:20:11 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2011-05-29 11:20:11 +0000 |
commit | 3b5ac2fb159a810778c7fd65b92b653d16fd86a5 (patch) | |
tree | b902269c838667774251a50ff5f2f02e6fa04691 /Source | |
parent | 2b9e866614294bdf269947d03188dc4fa474dd23 (diff) | |
download | sequelpro-3b5ac2fb159a810778c7fd65b92b653d16fd86a5.tar.gz sequelpro-3b5ac2fb159a810778c7fd65b92b653d16fd86a5.tar.bz2 sequelpro-3b5ac2fb159a810778c7fd65b92b653d16fd86a5.zip |
- 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
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPExportFile.m | 5 |
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]]) { |