mirror of
https://github.com/lifegpc/eh-downloader.git
synced 2026-06-29 15:36:51 +08:00
Bug fix
This commit is contained in:
@@ -118,7 +118,10 @@ export class Config {
|
||||
|
||||
export async function load_settings(path: string) {
|
||||
if (!await exists(path)) return new Config({});
|
||||
const s = (new TextDecoder()).decode(await Deno.readFile(path));
|
||||
let s = (new TextDecoder()).decode(await Deno.readFile(path));
|
||||
while (!s.length) {
|
||||
s = (new TextDecoder()).decode(await Deno.readFile(path));
|
||||
}
|
||||
return new Config(parse(s));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user