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 fileName = filePath.substring(lastSlash + 1);
if (dir !== currentPath) {
await loadDir(dir);
}
// Always reload directory to ensure entries are fresh
await loadDir(dir);
await tick();
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) => {