diff options
author | Max <post@wickenrode.com> | 2015-10-24 14:41:14 +0200 |
---|---|---|
committer | Max <post@wickenrode.com> | 2015-10-24 14:41:14 +0200 |
commit | 885d0cabc06c3a130ea54bed1621078bbad715c0 (patch) | |
tree | c8207e5f21d65a07da805d10b8dd7e097e646948 /Source/SPExportInitializer.m | |
parent | b089a0d3249d3139bedc2679a36efa705d2bae04 (diff) | |
download | sequelpro-885d0cabc06c3a130ea54bed1621078bbad715c0.tar.gz sequelpro-885d0cabc06c3a130ea54bed1621078bbad715c0.tar.bz2 sequelpro-885d0cabc06c3a130ea54bed1621078bbad715c0.zip |
Fix table name token not being used in SQL exports even when only one table is selected (#1858)
Diffstat (limited to 'Source/SPExportInitializer.m')
-rw-r--r-- | Source/SPExportInitializer.m | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/SPExportInitializer.m b/Source/SPExportInitializer.m index 03284525..1b9fb5a8 100644 --- a/Source/SPExportInitializer.m +++ b/Source/SPExportInitializer.m @@ -304,7 +304,8 @@ [sqlExporter setSqlExportTables:exportTables]; // Create custom filename if required - [exportFilename setString:(createCustomFilename) ? [self expandCustomFilenameFormatUsingTableName:nil] : [self generateDefaultExportFilename]]; + NSString *selectedTableName = (exportSource == SPTableExport && [exportTables count] == 1)? [[exportTables objectAtIndex:0] objectAtIndex:0] : nil; + [exportFilename setString:(createCustomFilename) ? [self expandCustomFilenameFormatUsingTableName:selectedTableName] : [self generateDefaultExportFilename]]; // Only append the extension if necessary if (![[exportFilename pathExtension] length]) { |