mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
fix: file://
中有中文无法正确解析
This commit is contained in:
parent
1936671cb3
commit
b28b812396
@ -4,7 +4,7 @@
|
|||||||
"name": "LLOneBot",
|
"name": "LLOneBot",
|
||||||
"slug": "LLOneBot",
|
"slug": "LLOneBot",
|
||||||
"description": "LiteLoaderQQNT的OneBotApi",
|
"description": "LiteLoaderQQNT的OneBotApi",
|
||||||
"version": "3.0.2",
|
"version": "3.0.3",
|
||||||
"thumbnail": "./icon.png",
|
"thumbnail": "./icon.png",
|
||||||
"authors": [{
|
"authors": [{
|
||||||
"name": "linyuchen",
|
"name": "linyuchen",
|
||||||
|
@ -39,11 +39,12 @@ export async function uri2local(fileName: string, uri: string){
|
|||||||
}
|
}
|
||||||
} else if (url.protocol === "file:"){
|
} else if (url.protocol === "file:"){
|
||||||
// await fs.copyFile(url.pathname, filePath);
|
// await fs.copyFile(url.pathname, filePath);
|
||||||
|
let pathname = decodeURIComponent(url.pathname)
|
||||||
if (process.platform === "win32"){
|
if (process.platform === "win32"){
|
||||||
filePath = url.pathname.slice(1)
|
filePath = pathname.slice(1)
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
filePath = url.pathname
|
filePath = pathname
|
||||||
}
|
}
|
||||||
res.isLocal = true
|
res.isLocal = true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user