From f95470504de66f10dc4479dc938cd4d43397a859 Mon Sep 17 00:00:00 2001 From: mio <10892119+biuuu@users.noreply.github.com> Date: Tue, 2 May 2023 09:04:06 +0800 Subject: [PATCH] fix: the manually specified installation path may not match (#4) --- src/main/getData.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/getData.js b/src/main/getData.js index 8326c30..f653406 100644 --- a/src/main/getData.js +++ b/src/main/getData.js @@ -115,7 +115,7 @@ const readLog = async () => { } const promises = logPaths.map(async logpath => { const logText = await fs.readFile(logpath, 'utf8') - const gamePathMch = logText.match(/\w:\/.*?(Star\sRail\/Games?\/StarRail_Data)/) + const gamePathMch = logText.match(/\w:\/.*?\/StarRail_Data\//) if (gamePathMch) { const cacheText = await fs.readFile(path.join(gamePathMch[0], '/webCaches/Cache/Cache_Data/data_2'), 'utf8') const urlMch = cacheText.match(/https.+?&auth_appid=webview_gacha&.+?authkey=.+?&game_biz=hkrpg_.+?&plat_type=pc/g)