aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPExportFileUtilities.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-08-26 18:49:05 +0000
committerstuconnolly <stuart02@gmail.com>2010-08-26 18:49:05 +0000
commit09b1063c73206cffb1819530498ef209e393a1a3 (patch)
tree1068083cf645f65a89487dfee15055657972926b /Source/SPExportFileUtilities.m
parent91c2f021d4a8e323872cc733becbdfc19870ceb7 (diff)
downloadsequelpro-09b1063c73206cffb1819530498ef209e393a1a3.tar.gz
sequelpro-09b1063c73206cffb1819530498ef209e393a1a3.tar.bz2
sequelpro-09b1063c73206cffb1819530498ef209e393a1a3.zip
If the user chooses to overwrite the output file(s) when performing an export make sure compression and CSV and XML headers and re-enable/rewritten.
Diffstat (limited to 'Source/SPExportFileUtilities.m')
-rw-r--r--Source/SPExportFileUtilities.m11
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/SPExportFileUtilities.m b/Source/SPExportFileUtilities.m
index 23eb7666..e256b1be 100644
--- a/Source/SPExportFileUtilities.m
+++ b/Source/SPExportFileUtilities.m
@@ -180,7 +180,16 @@
{
if ([file exportFileHandleStatus] == SPExportFileHandleExists) {
- [file createExportFileHandle:YES];
+ if ([file createExportFileHandle:YES] == SPExportFileHandleCreated) {
+ [file setCompressionFormat:[exportOutputCompressionFormatPopupButton indexOfSelectedItem]];
+
+ if ([file exportFileNeedsCSVHeader]) {
+ [self writeCSVHeaderToExportFile:file];
+ }
+ else if ([file exportFileNeedsXMLHeader]) {
+ [self writeXMLHeaderToExportFile:file];
+ }
+ }
}
}