aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPExportInitializer.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2011-04-29 19:55:47 +0000
committerstuconnolly <stuart02@gmail.com>2011-04-29 19:55:47 +0000
commitc0f8ea3f976f4df58b185d2636b5899c8d48d180 (patch)
tree9d9403b4f027a83e7469b412e53ee9c1765b155a /Source/SPExportInitializer.m
parent1ee20f146dabafa7a894a4e281e15d837173b390 (diff)
downloadsequelpro-c0f8ea3f976f4df58b185d2636b5899c8d48d180.tar.gz
sequelpro-c0f8ea3f976f4df58b185d2636b5899c8d48d180.tar.bz2
sequelpro-c0f8ea3f976f4df58b185d2636b5899c8d48d180.zip
When performing an SQL export only append the file extension if necessary. Fixes issue #1035.
Diffstat (limited to 'Source/SPExportInitializer.m')
-rw-r--r--Source/SPExportInitializer.m7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/SPExportInitializer.m b/Source/SPExportInitializer.m
index f1868210..32ce7ff5 100644
--- a/Source/SPExportInitializer.m
+++ b/Source/SPExportInitializer.m
@@ -282,8 +282,11 @@
// Create custom filename if required
[exportFilename setString:(createCustomFilename) ? [self expandCustomFilenameFormatFromString:[exportCustomFilenameTokenField stringValue] usingTableName:nil] : [self generateDefaultExportFilename]];
- [exportFilename setString:[exportFilename stringByAppendingPathExtension:[self currentDefaultExportFileExtension]]];
-
+ // Only append the extension if necessary
+ if (![[exportFilename pathExtension] length]) {
+ [exportFilename setString:[exportFilename stringByAppendingPathExtension:[self currentDefaultExportFileExtension]]];
+ }
+
file = [SPExportFile exportFileAtPath:[[exportPathField stringValue] stringByAppendingPathComponent:exportFilename]];
[exportFiles addObject:file];