From b28b812396178f6a4f79b1c26557d84a918b2e4c Mon Sep 17 00:00:00 2001
From: linyuchen <lin.yu.chen@hotmail.com>
Date: Tue, 13 Feb 2024 19:56:02 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20`file://`=E4=B8=AD=E6=9C=89=E4=B8=AD?=
 =?UTF-8?q?=E6=96=87=E6=97=A0=E6=B3=95=E6=AD=A3=E7=A1=AE=E8=A7=A3=E6=9E=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 manifest.json         | 2 +-
 src/onebot11/utils.ts | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/manifest.json b/manifest.json
index 1334a45..7f133d1 100644
--- a/manifest.json
+++ b/manifest.json
@@ -4,7 +4,7 @@
     "name": "LLOneBot",
     "slug": "LLOneBot",
     "description": "LiteLoaderQQNT的OneBotApi",
-    "version": "3.0.2",
+    "version": "3.0.3",
     "thumbnail": "./icon.png",
     "authors": [{
         "name": "linyuchen",
diff --git a/src/onebot11/utils.ts b/src/onebot11/utils.ts
index cf5b7c8..d1cdfdc 100644
--- a/src/onebot11/utils.ts
+++ b/src/onebot11/utils.ts
@@ -39,11 +39,12 @@ export async function uri2local(fileName: string, uri: string){
         }
     } else if (url.protocol === "file:"){
         // await fs.copyFile(url.pathname, filePath);
+        let pathname = decodeURIComponent(url.pathname)
         if (process.platform === "win32"){
-            filePath = url.pathname.slice(1)
+            filePath = pathname.slice(1)
         }
         else{
-            filePath = url.pathname
+            filePath = pathname
         }
         res.isLocal = true
     }