a2bei4-utils 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1224,6 +1224,9 @@ async function fetchOrDownloadByUrl(url, fileName) {
1224
1224
  const urlPathname = new URL(url).pathname;
1225
1225
  // 获取路径的最后一部分作为文件名,并移除可能的查询参数
1226
1226
  fileName = urlPathname.substring(urlPathname.lastIndexOf("/") + 1).split("?")[0];
1227
+ if (fileName) {
1228
+ fileName = decodeURIComponent(fileName);
1229
+ }
1227
1230
  } catch (e) {}
1228
1231
  // 如果提取后文件名为空(例如 URL 以 '/' 结尾),也使用时间戳
1229
1232
  if (!fileName) {