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 }