system: skip dataDir analysis if it is missing

This commit is contained in:
Girish Ramakrishnan
2025-12-05 15:59:49 +01:00
parent f714cd66f7
commit 392d47852d
+1 -1
View File
@@ -163,7 +163,7 @@ async function getFilesystems() {
if (!app.manifest.addons?.localstorage) continue;
const dataDir = await apps.getStorageDir(app);
if (dataDir === null) continue;
if (dataDir === null || !fs.existsSync(dataDir)) continue; // when restoring, this path may not be available yet
const [, dfResult] = await safe(df.file(dataDir));
const filesystem = dfResult?.filesystem || rootDisk.filesystem;
if (filesystems[filesystem]) filesystems[filesystem].contents.push({ type: 'app', id: app.id, name: app.label || app.fqdn, path: dataDir });