修复win环境下的图片同步路径错误
This commit is contained in:
parent
4a81506aec
commit
6e0600c30c
@ -48,5 +48,5 @@ function readDirSync(imageFolderPath, images, rootPath, callback, count={fileCou
|
||||
}
|
||||
|
||||
module.exports = function (rootPath, imageFloder, callback) {
|
||||
readDirSync(path.resolve(rootPath, imageFloder), [], rootPath, callback)
|
||||
readDirSync(path.resolve(rootPath, imageFloder).replace(/\\/g,'/'), [], rootPath, callback)
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ gulp.task('syncImages', () => {
|
||||
return Promise.resolve('未获得accessKey以及accessSecret, 跳过图片同步').then(console.log)
|
||||
}
|
||||
// 同步当前本地存在的所有图片
|
||||
const rootPath = `${process.cwd()}/`
|
||||
const rootPath = `${process.cwd()}/`.replace(/\\/g, '/')
|
||||
return new Promise(resolve => {
|
||||
listImages(rootPath, 'images/', resolve)
|
||||
}).then(imagesList => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user