From 8243255316e6c52bb0933f6290fc564c559c8f2a Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Mon, 12 Oct 2020 19:02:25 -0700 Subject: [PATCH] fix: s3put not replacing enough \\ (#25866) --- script/lib/s3put.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;