Skip to content

Commit

Permalink
fix(Squirrel.Windows): Remove encodeUri from squirrel-windows packaging
Browse files Browse the repository at this point in the history
Close #2557, Close #2558
  • Loading branch information
rkistner authored and develar committed Feb 7, 2018
1 parent c57c52a commit 7a37cef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ async function pack(options: SquirrelOptions, directory: string, updateFile: str
</metadata>
</package>`
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(`<?xml version="1.0" encoding="utf-8"?>
Expand Down Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions test/out/windows/__snapshots__/squirrelWindowsTest.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 7a37cef

Please sign in to comment.