opt: dynamically adjust basePath in js

This commit is contained in:
KOWX712
2025-03-21 18:57:52 +08:00
parent 530f006154
commit e704bda0f7
6 changed files with 27 additions and 19 deletions

View File

@@ -225,7 +225,7 @@ export function securityPatch() {
// Auto config button
autoButton.addEventListener('click', async () => {
try {
const output = await execCommand(`sh ${basePath}common/get_extra.sh --security-patch`);
const output = await execCommand(`sh ${basePath}/common/get_extra.sh --security-patch`);
if (output.trim() === "not set") {
showPrompt('security_patch.auto_failed', false);
} else {
@@ -318,7 +318,7 @@ export function securityPatch() {
try {
showPrompt('security_patch.fetching');
await new Promise(resolve => setTimeout(resolve, 200));
const output = await execCommand(`sh ${basePath}common/get_extra.sh --get-security-patch`);
const output = await execCommand(`sh ${basePath}/common/get_extra.sh --get-security-patch`);
showPrompt('security_patch.fetched', true, 1000);
checkAdvanced(true);