From 6e0600c30cbc7ac9f19781a0143089688ac18711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=93=E5=8F=91=E5=8F=97=E9=95=BF=E7=94=9F?= Date: Fri, 25 Oct 2019 08:49:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dwin=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E4=B8=8B=E7=9A=84=E5=9B=BE=E7=89=87=E5=90=8C=E6=AD=A5=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy_utils/list_images.js | 2 +- gulpfile.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 => {