Revert: file manager

This commit is contained in:
alongw 2024-03-19 15:27:49 +08:00
parent 88444bc820
commit e38433bf18

View File

@ -126,10 +126,8 @@ export const useFileManager = (instanceId?: string, daemonId?: string) => {
operationForm.value.total = res.value?.total || 0; operationForm.value.total = res.value?.total || 0;
} catch (error: any) { } catch (error: any) {
if (throwErr) throw error; if (throwErr) throw error;
reportErrorMsg(error.message); return reportErrorMsg(error.message);
return false;
} }
return true;
}; };
const reloadList = async () => { const reloadList = async () => {
@ -450,9 +448,8 @@ export const useFileManager = (instanceId?: string, daemonId?: string) => {
if (breadcrumbs.findIndex((e) => e.path === dir) === -1) if (breadcrumbs.findIndex((e) => e.path === dir) === -1)
return reportErrorMsg(t("TXT_CODE_96281410")); return reportErrorMsg(t("TXT_CODE_96281410"));
spinning.value = true; spinning.value = true;
if (await getFileList()) { breadcrumbs.splice(breadcrumbs.findIndex((e) => e.path === dir) + 1);
breadcrumbs.splice(breadcrumbs.findIndex((e) => e.path === dir) + 1); await getFileList();
}
spinning.value = false; spinning.value = false;
}; };