|
|
|
@ -5,7 +5,7 @@
|
|
|
|
|
const Git = require('git-wrapper2-promise')
|
|
|
|
|
const Promise = require('bluebird')
|
|
|
|
|
const path = require('path')
|
|
|
|
|
const fs = Promise.promisifyAll(require('fs'))
|
|
|
|
|
const fs = Promise.promisifyAll(require('fs-extra'))
|
|
|
|
|
const _ = require('lodash')
|
|
|
|
|
const URL = require('url')
|
|
|
|
|
|
|
|
|
@ -229,7 +229,9 @@ module.exports = {
|
|
|
|
|
let self = this
|
|
|
|
|
let gitFilePath = entryPath + '.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) => {
|
|
|
|
|
let out = cProc.stdout.toString()
|
|
|
|
|
if (_.includes(out, 'fatal')) {
|
|
|
|
@ -238,6 +240,7 @@ module.exports = {
|
|
|
|
|
}
|
|
|
|
|
return true
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|