mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 17:32:17 +00:00
Enhanced KDB file handling
Locking now stores as KDB internally not just to disk Logging when data loss occurs
This commit is contained in:
@@ -433,7 +433,7 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou
|
||||
[self.undoManager removeAllActions];
|
||||
NSError *error;
|
||||
/* TODO let the tree chose the encryption */
|
||||
self.encryptedData = [self.tree encryptWithKey:self.compositeKey format:KPKDatabaseFormatKdbx error:&error];
|
||||
self.encryptedData = [self.tree encryptWithKey:self.compositeKey format:[MPDocument formatForFileType:self.fileType] error:&error];
|
||||
if(nil == self.encryptedData && error ) {
|
||||
[self presentError:error];
|
||||
return;
|
||||
@@ -613,6 +613,12 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou
|
||||
return nil; // no new Groups in trash
|
||||
}
|
||||
|
||||
if([self.fileType isEqualToString:MPKdbDocumentUTI]) {
|
||||
if([self.tree minimumVersionForAddingEntryToGroup:parent].format == KPKDatabaseFormatKdbx) {
|
||||
NSLog(@"Warning: Database format does not allow for adding entries to this group!");
|
||||
}
|
||||
}
|
||||
|
||||
KPKEntry *newEntry = [self.tree createEntry:parent];
|
||||
/* setting properties on entries is undoable, but we do not want to record this so disable on creation */
|
||||
BOOL wasUndoEnabeld = self.undoManager.isUndoRegistrationEnabled;
|
||||
|
||||
@@ -76,7 +76,6 @@ typedef NS_ENUM(NSInteger, MPIconDownloadStatus) {
|
||||
}
|
||||
|
||||
- (IBAction)downloadIcon:(id)sender {
|
||||
//self.downloadStatus = MPIconDownloadStatusProgress;
|
||||
KPKNode *node = self.representedObject;
|
||||
if(!node.asEntry) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user