From 7a37cefc121c5ac307b6ceb4bc71f2645735acd1 Mon Sep 17 00:00:00 2001 From: Ralf Kistner Date: Wed, 7 Feb 2018 17:24:20 +0100 Subject: [PATCH] fix(Squirrel.Windows): Remove encodeUri from squirrel-windows packaging Close #2557, Close #2558 --- .../electron-builder-squirrel-windows/src/squirrelPack.ts | 5 ++--- .../out/windows/__snapshots__/squirrelWindowsTest.js.snap | 8 ++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/electron-builder-squirrel-windows/src/squirrelPack.ts b/packages/electron-builder-squirrel-windows/src/squirrelPack.ts index bce8f692b2c..2475b612646 100644 --- a/packages/electron-builder-squirrel-windows/src/squirrelPack.ts +++ b/packages/electron-builder-squirrel-windows/src/squirrelPack.ts @@ -165,7 +165,7 @@ async function pack(options: SquirrelOptions, directory: string, updateFile: str ` debug(`Created NuSpec file:\n${nuspecContent}`) - archive.append(nuspecContent.replace(/\n/, "\r\n"), {name: `${encodeURI(options.name).replace(/%5B/g, "[").replace(/%5D/g, "]")}.nuspec`}) + archive.append(nuspecContent.replace(/\n/, "\r\n"), {name: `${options.name}.nuspec`}) //noinspection SpellCheckingInspection archive.append(` @@ -241,8 +241,7 @@ async function encodedZip(archive: any, dir: string, prefix: string, vendorPath: return } - // GBK file name encoding (or Non-English file name) caused a problem - const relativeSafeFilePath = encodeURI(file.substring(dir.length + 1).replace(/\\/g, "/")).replace(/%5B/g, "[").replace(/%5D/g, "]") + const relativeSafeFilePath = file.substring(dir.length + 1).replace(/\\/g, "/") archive._append(file, { name: relativeSafeFilePath, prefix, diff --git a/test/out/windows/__snapshots__/squirrelWindowsTest.js.snap b/test/out/windows/__snapshots__/squirrelWindowsTest.js.snap index 2cc38c11610..ad6800f232c 100644 --- a/test/out/windows/__snapshots__/squirrelWindowsTest.js.snap +++ b/test/out/windows/__snapshots__/squirrelWindowsTest.js.snap @@ -77,8 +77,8 @@ Array [ "lib/net45/node.dll", "lib/net45/pdf_viewer_resources.pak", "lib/net45/snapshot_blob.bin", - "lib/net45/Test%20App%20%C3%9FW.exe", - "lib/net45/Test%20App%20%C3%9FW_ExecutionStub.exe", + "lib/net45/Test App ßW.exe", + "lib/net45/Test App ßW_ExecutionStub.exe", "lib/net45/ucrtbase.dll", "lib/net45/ui_resources_200_percent.pak", "lib/net45/Update.exe", @@ -175,8 +175,8 @@ Array [ "lib/net45/node.dll", "lib/net45/pdf_viewer_resources.pak", "lib/net45/snapshot_blob.bin", - "lib/net45/Test%20App%20%C3%9FW.exe", - "lib/net45/Test%20App%20%C3%9FW_ExecutionStub.exe", + "lib/net45/Test App ßW.exe", + "lib/net45/Test App ßW_ExecutionStub.exe", "lib/net45/ucrtbase.dll", "lib/net45/ui_resources_200_percent.pak", "lib/net45/Update.exe",