Fix create new note should not use default note created time

This commit is contained in:
Cheng-Han, Wu 2016-06-17 16:28:04 +08:00
parent 71f61b7f84
commit 18f7eb281c

View file

@ -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