diff options
author | stuconnolly <stuart02@gmail.com> | 2011-04-29 19:55:47 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2011-04-29 19:55:47 +0000 |
commit | c0f8ea3f976f4df58b185d2636b5899c8d48d180 (patch) | |
tree | 9d9403b4f027a83e7469b412e53ee9c1765b155a | |
parent | 1ee20f146dabafa7a894a4e281e15d837173b390 (diff) | |
download | sequelpro-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.
-rw-r--r-- | Source/SPExportInitializer.m | 7 |
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]; |