aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPExportController.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPExportController.m')
-rw-r--r--Source/SPExportController.m9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/SPExportController.m b/Source/SPExportController.m
index df95d204..f9d5628e 100644
--- a/Source/SPExportController.m
+++ b/Source/SPExportController.m
@@ -650,12 +650,17 @@ static const NSString *SPSQLExportDropEnabled = @"SQLExportDropEnabled";
// token - this suggests it's not a one-off filename
if ([[exportCustomFilenameTokenField stringValue] length] < 1) {
[prefs removeObjectForKey:SPExportFilenameFormat];
- } else {
+ }
+ else {
BOOL saveFilename = NO;
+
NSArray *representedObjects = [exportCustomFilenameTokenField objectValue];
- for (id aToken in representedObjects) {
+
+ for (id aToken in representedObjects)
+ {
if ([aToken isKindOfClass:[SPExportFileNameTokenObject class]]) saveFilename = YES;
}
+
if (saveFilename) [prefs setObject:[NSKeyedArchiver archivedDataWithRootObject:representedObjects] forKey:SPExportFilenameFormat];
}