aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-06-18 12:26:06 +0000
committerstuconnolly <stuart02@gmail.com>2010-06-18 12:26:06 +0000
commitd59b7c6e69a6fa47eca55fda006d826e988c1384 (patch)
tree338274ffc2a2bd7e07c5a6a76f236503357ae368 /Source
parentf69e43ab30e9a7cf9d97d871f34f1d68ee09cc24 (diff)
downloadsequelpro-d59b7c6e69a6fa47eca55fda006d826e988c1384.tar.gz
sequelpro-d59b7c6e69a6fa47eca55fda006d826e988c1384.tar.bz2
sequelpro-d59b7c6e69a6fa47eca55fda006d826e988c1384.zip
Fix CSV exporting by correctly setting the filename when exporting to multiple files.
Diffstat (limited to 'Source')
-rw-r--r--Source/SPExportInitializer.m8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/SPExportInitializer.m b/Source/SPExportInitializer.m
index d912f87a..e41d4a44 100644
--- a/Source/SPExportInitializer.m
+++ b/Source/SPExportInitializer.m
@@ -332,6 +332,7 @@
break;
}
}
+
[exportFilename setString:[exportFilename stringByAppendingPathExtension:@"xml"]];
singleFileHandle = [self getFileHandleForFilePath:[[exportPathField stringValue] stringByAppendingPathComponent:exportFilename]];
@@ -470,7 +471,10 @@
// sure the table name is included to ensure the output files are unique.
[exportFilename setString:([[exportCustomFilenameTokenField stringValue] rangeOfString:@"table" options:NSLiteralSearch].location == NSNotFound) ? [exportFilename stringByAppendingFormat:@"_%@", table] : exportFilename];
}
-
+ else {
+ [exportFilename setString:(dataArray) ? [tableDocumentInstance database] : table];
+ }
+
fileHandle = [self getFileHandleForFilePath:[[exportPathField stringValue] stringByAppendingPathComponent:exportFilename]];
[csvExporter setExportOutputFileHandle:fileHandle];
@@ -484,7 +488,7 @@
// Set the progress bar's max value
[exportProgressIndicator setMaxValue:[csvExporter exportMaxProgress]];
-
+
return [csvExporter autorelease];
}