diff --git a/packages/electron-builder-squirrel-windows/src/squirrelPack.ts b/packages/electron-builder-squirrel-windows/src/squirrelPack.ts index bce8f692b2c..7b968f1a91f 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(` @@ -242,7 +242,7 @@ async function encodedZip(archive: any, dir: string, prefix: string, vendorPath: } // 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, @@ -266,4 +266,4 @@ async function encodedZip(archive: any, dir: string, prefix: string, vendorPath: } }) archive.finalize() -} \ No newline at end of file +}