aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDump.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/TableDump.m')
-rw-r--r--Source/TableDump.m10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/TableDump.m b/Source/TableDump.m
index 4ea1255e..45c5c711 100644
--- a/Source/TableDump.m
+++ b/Source/TableDump.m
@@ -170,9 +170,9 @@
[self reloadTables:self];
[sqlCompressionSwitch setState:[prefs boolForKey:SPSQLExportUseCompression]?NSOnState:NSOffState];
if ([prefs boolForKey:SPSQLExportUseCompression]) {
- [currentExportPanel setAllowedFileTypes:[NSArray arrayWithObjects:@"sql.gz", @"gz", nil]];
+ [currentExportPanel setAllowedFileTypes:[NSArray arrayWithObjects:[NSString stringWithFormat:@"%@.gz", SPFileExtensionSQL], @"gz", nil]];
} else {
- [currentExportPanel setAllowedFileTypes:[NSArray arrayWithObjects:@"sql", nil]];
+ [currentExportPanel setAllowedFileTypes:[NSArray arrayWithObjects:SPFileExtensionSQL, nil]];
}
file = [NSString stringWithFormat:@"%@_%@.%@", [tableDocumentInstance database], currentDate, [currentExportPanel requiredFileType]];
[currentExportPanel setAccessoryView:exportDumpView];
@@ -3151,12 +3151,12 @@
{
if (exportMode == SPExportingSQL) {
if ([sender state] == NSOnState) {
- [currentExportPanel setAllowedFileTypes:[NSArray arrayWithObjects:@"sql.gz", @"gz", nil]];
+ [currentExportPanel setAllowedFileTypes:[NSArray arrayWithObjects:[NSString stringWithFormat:@"%@.gz", SPFileExtensionSQL], @"gz", nil]];
// if file name text view is the first responder re-select the path name only without '.sql.gz'
if([[currentExportPanel firstResponder] isKindOfClass:[NSTextView class]]) {
NSTextView *filenameTextView = (NSTextView *)[currentExportPanel firstResponder];
- if([filenameTextView selectedRange].length > 4 && [[filenameTextView string] hasSuffix:@".sql.gz"]) {
+ if([filenameTextView selectedRange].length > 4 && [[filenameTextView string] hasSuffix:[NSString stringWithFormat:@".%@.gz", SPFileExtensionSQL]]) {
NSRange selRange = [filenameTextView selectedRange];
selRange.length -= 4;
[filenameTextView setSelectedRange:selRange];
@@ -3164,7 +3164,7 @@
}
} else {
- [currentExportPanel setAllowedFileTypes:[NSArray arrayWithObject:@"sql"]];
+ [currentExportPanel setAllowedFileTypes:[NSArray arrayWithObject:SPFileExtensionSQL]];
}
[prefs setBool:([sender state] == NSOnState) forKey:SPSQLExportUseCompression];
}