Skip to content
Snippets Groups Projects
Commit 25223bd8 authored by George Nachman's avatar George Nachman
Browse files

Rename saveToDisk to shouldSaveToDisk

parent a0d37c1f
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -107,7 +107,6 @@ extern NSString *const kDirectoriesDidChangeNotificationName;
- (void)eraseDirectoriesForHost:(VT100RemoteHost *)host;
- (NSString *)pathForFileNamed:(NSString *)name;
- (NSTimeInterval)now;
- (BOOL)saveToDisk;
- (NSString *)databaseFilenamePrefix;
- (BOOL)finishInitialization;
- (instancetype)initPartially;
Loading
Loading
Loading
Loading
@@ -175,7 +175,7 @@ static const NSTimeInterval kMaxTimeToRememberDirectories = 60 * 60 * 24 * 90;
// need to wait for it to finish before -loadCommandHistory could be called.
NSError *error = nil;
NSString *storeType;
if ([self saveToDisk] || vacuum) {
if ([self shouldSaveToDisk] || vacuum) {
_savingToDisk = YES;
storeType = NSSQLiteStoreType;
} else {
Loading
Loading
@@ -196,7 +196,7 @@ static const NSTimeInterval kMaxTimeToRememberDirectories = 60 * 60 * 24 * 90;
error:&error];
if (error) {
NSLog(@"Got an exception when opening the command history database: %@", error);
if (![self saveToDisk]) {
if (![self shouldSaveToDisk]) {
NSLog(@"This is an in-memory database, it should not fail.");
return NO;
}
Loading
Loading
@@ -257,7 +257,7 @@ static const NSTimeInterval kMaxTimeToRememberDirectories = 60 * 60 * 24 * 90;
}
}
 
- (BOOL)saveToDisk {
- (BOOL)shouldSaveToDisk {
return [iTermPreferences boolForKey:kPreferenceKeySavePasteAndCommandHistory];
}
 
Loading
Loading
@@ -402,7 +402,7 @@ static const NSTimeInterval kMaxTimeToRememberDirectories = 60 * 60 * 24 * 90;
}
 
- (void)backingStoreTypeDidChange {
if (!self.saveToDisk) {
if (!self.shouldSaveToDisk) {
[self eraseCommandHistory:YES directories:YES];
}
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment