This commit is contained in:
Timothy Jaeryang Baek
2026-03-04 16:52:01 -06:00
parent 49a2e5bf57
commit 7ef181bc13
+9 -5
View File
@@ -484,13 +484,17 @@
const dir = lastSlash > 0 ? filePath.substring(0, lastSlash + 1) : '/'; const dir = lastSlash > 0 ? filePath.substring(0, lastSlash + 1) : '/';
const fileName = filePath.substring(lastSlash + 1); const fileName = filePath.substring(lastSlash + 1);
if (dir !== currentPath) { // Always reload directory to ensure entries are fresh
await loadDir(dir); await loadDir(dir);
}
await tick(); await tick();
const entry = entries.find((e) => e.name === fileName); const entry = entries.find((e) => e.name === fileName);
if (entry) await openEntry(entry); if (entry) {
await openEntry(entry);
} else {
// File may not be in listing; open it directly
await openEntry({ name: fileName, type: 'file', size: 0 });
}
}); });
const unsubFileNavDir = showFileNavDir.subscribe(async (filePath) => { const unsubFileNavDir = showFileNavDir.subscribe(async (filePath) => {