File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ module.exports = function (sequelize, DataTypes) {
97
97
if ( ! note . alias ) {
98
98
filePath = config . defaultNotePath
99
99
} else {
100
- filePath = path . join ( config . docsPath , note . alias + '.md' )
100
+ filePath = path . join ( config . docsPath , path . basename ( node . alias ) + '.md' )
101
101
}
102
102
if ( Note . checkFileExist ( filePath ) ) {
103
103
var fsCreatedTime = moment ( fs . statSync ( filePath ) . ctime )
@@ -206,7 +206,7 @@ module.exports = function (sequelize, DataTypes) {
206
206
}
207
207
} ) . then ( function ( note ) {
208
208
if ( note ) {
209
- const filePath = path . join ( config . docsPath , noteId + '.md' )
209
+ const filePath = path . join ( config . docsPath , path . basename ( noteId ) + '.md' )
210
210
if ( Note . checkFileExist ( filePath ) ) {
211
211
// if doc in filesystem have newer modified time than last change time
212
212
// then will update the doc in db
@@ -248,7 +248,7 @@ module.exports = function (sequelize, DataTypes) {
248
248
return callback ( null , note . id )
249
249
}
250
250
} else {
251
- var filePath = path . join ( config . docsPath , noteId + '.md' )
251
+ var filePath = path . join ( config . docsPath , path . basename ( noteId ) + '.md' )
252
252
if ( Note . checkFileExist ( filePath ) ) {
253
253
Note . create ( {
254
254
alias : noteId ,
You can’t perform that action at this time.
0 commit comments