diff --git a/deploy_utils/list_images.js b/deploy_utils/list_images.js index 5bca10a..8fc2689 100644 --- a/deploy_utils/list_images.js +++ b/deploy_utils/list_images.js @@ -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) } diff --git a/gulpfile.js b/gulpfile.js index 1ea4811..bc26f54 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -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 => {