diff --git a/lib/models/note.js b/lib/models/note.js index ace072a..a442f88 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