Skip to content

Commit

Permalink
MXFileStore: Be more robust on commit interruption: Change after Giom…
Browse files Browse the repository at this point in the history
  • Loading branch information
manuroe committed Aug 16, 2016
1 parent 3cf8247 commit 13cd0c3
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions MatrixSDK/Data/Store/MXFileStore/MXFileStore.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ @interface MXFileStore ()
// The path of the backup folder
NSString *storeBackupPath;

// The path of the temporary file created during saving process.
NSString *savingMarkerFile;

// The path of the rooms folder
NSString *storeRoomsPath;

Expand Down Expand Up @@ -467,11 +464,6 @@ - (void)commit
[self saveRoomsState];
[self saveRoomsAccountData];
[self saveReceipts];

// Save meta data only at the end because it is critical to save the eventStreamToken
// after everything else.
// If there is a crash during the commit operation, we will be able to retrieve non
// stored data thanks to the old eventStreamToken stored at the previous commit.
[self saveMetaData];

// The data saving is completed: remove the backuped data.
Expand Down Expand Up @@ -529,7 +521,7 @@ - (NSString*)storeBackupRoomsPath
stringByAppendingPathComponent:kMXFileStoreRoomsFolder];
}

return backupEventStreamToken;
return storeBackupRoomsPath;
}

- (void)checkFolderExistenceForRoom:(NSString*)roomId forBackup:(BOOL)backup
Expand Down

0 comments on commit 13cd0c3

Please sign in to comment.