diff options
author | stuconnolly <stuart02@gmail.com> | 2011-08-24 19:54:29 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2011-08-24 19:54:29 +0000 |
commit | 4f9debeff37605793552f7fe8c3d3f1e5b4c58e2 (patch) | |
tree | 71a38f1885e576e77a4b2e2ebd05ef7992cfc12f /Source/SPExportController.m | |
parent | 44aecf82db1ae3fe76f16f3f92ae580130713e0e (diff) | |
download | sequelpro-4f9debeff37605793552f7fe8c3d3f1e5b4c58e2.tar.gz sequelpro-4f9debeff37605793552f7fe8c3d3f1e5b4c58e2.tar.bz2 sequelpro-4f9debeff37605793552f7fe8c3d3f1e5b4c58e2.zip |
Tidy up.
Diffstat (limited to 'Source/SPExportController.m')
-rw-r--r-- | Source/SPExportController.m | 9 |
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]; } |