From 18f7eb281c79294ac79ab4896ea74509c4733ea8 Mon Sep 17 00:00:00 2001 From: Cheng-Han, Wu Date: Fri, 17 Jun 2016 16:28:04 +0800 Subject: Fix create new note should not use default note created time --- lib/models/note.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/models/note.js b/lib/models/note.js index ace072a3..a442f889 100644 --- a/lib/models/note.js +++ b/lib/models/note.js @@ -223,7 +223,9 @@ module.exports = function (sequelize, DataTypes) { body = fs.readFileSync(filePath, 'utf8'); note.title = LZString.compressToBase64(Note.parseNoteTitle(body)); note.content = LZString.compressToBase64(body); - note.createdAt = fsCreatedTime; + if (filePath !== config.defaultnotepath) { + note.createdAt = fsCreatedTime; + } } } // if no permission specified and have owner then give editable permission, else default permission is freely -- cgit v1.2.3