Skip to content

Commit 8243255

Browse files
authored
fix: s3put not replacing enough \\ (electron#25866)
1 parent 501900c commit 8243255

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

script/lib/s3put.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if (prefix && !prefix.endsWith(path.sep)) prefix = path.resolve(prefix) + path.s
1313
function filenameToKey (file) {
1414
file = path.resolve(file);
1515
if (file.startsWith(prefix)) file = file.substr(prefix.length - 1);
16-
return key_prefix + file.replace(path.sep, '/');
16+
return key_prefix + (path.sep === '\\' ? file.replace(/\\/g, '/') : file);
1717
}
1818

1919
let anErrorOccurred = false;

0 commit comments

Comments
 (0)