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.
@@ -1222,6 +1222,9 @@ async function fetchOrDownloadByUrl(url, fileName) {
1222
1222
  const urlPathname = new URL(url).pathname;
1223
1223
  // 获取路径的最后一部分作为文件名,并移除可能的查询参数
1224
1224
  fileName = urlPathname.substring(urlPathname.lastIndexOf("/") + 1).split("?")[0];
1225
+ if (fileName) {
1226
+ fileName = decodeURIComponent(fileName);
1227
+ }
1225
1228
  } catch (e) {}
1226
1229
  // 如果提取后文件名为空(例如 URL 以 '/' 结尾),也使用时间戳
1227
1230
  if (!fileName) {