aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDatabaseDocument.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r--Source/SPDatabaseDocument.m8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index 75af2ed1..f8f1585b 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -3961,12 +3961,14 @@ static NSString *SPRenameDatabaseAction = @"SPRenameDatabase";
// edits in progress in various views.
if ( ![tablesListInstance selectionShouldChangeInTableView:nil] ) return NO;
- // Auto-save spf file based connection and return whether the save was successful
+ // Auto-save spf file based connection and return if the save was not successful
if([self fileURL] && [[[self fileURL] path] length] && ![self isUntitled]) {
BOOL isSaved = [self saveDocumentWithFilePath:nil inBackground:YES onlyPreferences:YES contextInfo:nil];
- if(isSaved)
+ if (isSaved) {
[[SPQueryController sharedQueryController] removeRegisteredDocumentWithFileURL:[self fileURL]];
- return isSaved;
+ } else {
+ return NO;
+ }
}
// Terminate all running BASH commands