|
|
@ -5,7 +5,7 @@
|
|
|
|
const Git = require('git-wrapper2-promise')
|
|
|
|
const Git = require('git-wrapper2-promise')
|
|
|
|
const Promise = require('bluebird')
|
|
|
|
const Promise = require('bluebird')
|
|
|
|
const path = require('path')
|
|
|
|
const path = require('path')
|
|
|
|
const fs = Promise.promisifyAll(require('fs'))
|
|
|
|
const fs = Promise.promisifyAll(require('fs-extra'))
|
|
|
|
const _ = require('lodash')
|
|
|
|
const _ = require('lodash')
|
|
|
|
const URL = require('url')
|
|
|
|
const URL = require('url')
|
|
|
|
|
|
|
|
|
|
|
@ -229,7 +229,9 @@ module.exports = {
|
|
|
|
let self = this
|
|
|
|
let self = this
|
|
|
|
let gitFilePath = entryPath + '.md'
|
|
|
|
let gitFilePath = entryPath + '.md'
|
|
|
|
let gitNewFilePath = newEntryPath + '.md'
|
|
|
|
let gitNewFilePath = newEntryPath + '.md'
|
|
|
|
|
|
|
|
let destPathObj = path.parse(this.getRepoPath() + '/' + gitNewFilePath)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return fs.ensureDir(destPathObj.dir).then(() => {
|
|
|
|
return self._git.exec('mv', [gitFilePath, gitNewFilePath]).then((cProc) => {
|
|
|
|
return self._git.exec('mv', [gitFilePath, gitNewFilePath]).then((cProc) => {
|
|
|
|
let out = cProc.stdout.toString()
|
|
|
|
let out = cProc.stdout.toString()
|
|
|
|
if (_.includes(out, 'fatal')) {
|
|
|
|
if (_.includes(out, 'fatal')) {
|
|
|
@ -238,6 +240,7 @@ module.exports = {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true
|
|
|
|
return true
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|