summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCheng-Han, Wu2016-06-17 16:28:04 +0800
committerCheng-Han, Wu2016-06-17 16:28:04 +0800
commit18f7eb281c79294ac79ab4896ea74509c4733ea8 (patch)
treeb21ede92054c830172ddecb4adb230f5c4fcdc14
parent71f61b7f840b7e557d44b130e69fdb3c9e24d6d9 (diff)
Fix create new note should not use default note created time
-rw-r--r--lib/models/note.js4
1 files changed, 3 insertions, 1 deletions
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