1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

update storage handler for the future update

This commit is contained in:
Dick Choi
2016-10-12 12:48:53 +09:00
parent 40d2960562
commit 823da07a5e

View File

@@ -28,9 +28,14 @@ function resolveStorageData (storageCache) {
storage.version = '1.0'
}
if (storage.version === '1.0') {
let version = parseInt(storage.version, 10)
if (version >= 1) {
if (version > 1) {
console.log('The repository version is newer than one of current app.')
}
return Promise.resolve(storage)
}
console.log('Transform Legacy storage', storage.path)
return migrateFromV6Storage(storage.path)
.then(() => storage)