mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
Added catch for exceptions, removed uneeded duplicate test.
This commit is contained in:
@@ -55,8 +55,12 @@ function init () {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (unknownCount > 0 && fs.existsSync(storage.path)) {
|
if (unknownCount > 0) {
|
||||||
CSON.writeFileSync(path.join(storage.path, 'boostnote.json'), _.pick(storage, ['folders', 'version']))
|
try {
|
||||||
|
CSON.writeFileSync(path.join(storage.path, 'boostnote.json'), _.pick(storage, ['folders', 'version']))
|
||||||
|
} catch (e) {
|
||||||
|
console.log('Error writting boostnote.json: ' + e + ' from init.js')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return notes
|
return notes
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user