diff --git a/script/lib/s3put.js b/script/lib/s3put.js index 781b906c8043..8f92b6d95dec 100644 --- a/script/lib/s3put.js +++ b/script/lib/s3put.js @@ -13,7 +13,7 @@ if (prefix && !prefix.endsWith(path.sep)) prefix = path.resolve(prefix) + path.s function filenameToKey (file) { file = path.resolve(file); if (file.startsWith(prefix)) file = file.substr(prefix.length - 1); - return key_prefix + file.replace(path.sep, '/'); + return key_prefix + (path.sep === '\\' ? file.replace(/\\/g, '/') : file); } let anErrorOccurred = false;