From 3e14bc11376552134cd3eedbda180a4593ac2aea Mon Sep 17 00:00:00 2001 From: serenader Date: Wed, 12 Aug 2015 12:01:50 +0800 Subject: [PATCH] fix filepath bug in windows system --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 8da4625..672294b 100644 --- a/index.js +++ b/index.js @@ -23,7 +23,7 @@ module.exports = function (qiniu, option) { return through2.obj(function (file, enc, next) { var that = this; var isIgnore = false; - var filePath = path.relative(file.base, file.path); + var filePath = path.relative(file.base, file.path).split(path.sep).join('/'); if (file._contents === null) return next(); option.ignore.forEach(function(item) {