mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
Added a few more checks in related methods to prevent simular errors
This commit is contained in:
@@ -40,6 +40,7 @@ function init () {
|
||||
|
||||
const fetchNotes = function (storages) {
|
||||
const findNotesFromEachStorage = storages
|
||||
.filter(storage => fs.existsSync(storage.path))
|
||||
.map((storage) => {
|
||||
return resolveStorageNotes(storage)
|
||||
.then((notes) => {
|
||||
@@ -54,7 +55,7 @@ function init () {
|
||||
})
|
||||
}
|
||||
})
|
||||
if (unknownCount > 0) {
|
||||
if (unknownCount > 0 && fs.existsSync(storage.path)) {
|
||||
CSON.writeFileSync(path.join(storage.path, 'boostnote.json'), _.pick(storage, ['folders', 'version']))
|
||||
}
|
||||
return notes
|
||||
|
||||
Reference in New Issue
Block a user