From 975e82710e40e303b97daebd289cf745ce30f720 Mon Sep 17 00:00:00 2001 From: Dick Choi Date: Tue, 20 Sep 2016 21:00:49 +0900 Subject: [PATCH] parse only cson files when reading notes --- browser/main/lib/dataApi/resolveStorageNotes.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/browser/main/lib/dataApi/resolveStorageNotes.js b/browser/main/lib/dataApi/resolveStorageNotes.js index 68885fce..3e0d3dfb 100644 --- a/browser/main/lib/dataApi/resolveStorageNotes.js +++ b/browser/main/lib/dataApi/resolveStorageNotes.js @@ -17,6 +17,9 @@ function resolveStorageNotes (storage) { notePathList = [] } let notes = notePathList + .filter(function filterOnlyCSONFile (notePath) { + return /\.cson$/.test(notePath) + }) .map(function parseCSONFile (notePath) { let data = CSON.readFileSync(path.join(notesDirPath, notePath)) data.key = path.basename(notePath, '.cson')