리펙토링: 전체 구조 검토, 개선

This commit is contained in:
2026-05-15 18:36:55 +09:00
parent 75a1f9e2f5
commit a1a5672d97
10 changed files with 117 additions and 23 deletions
+8 -1
View File
@@ -125,7 +125,14 @@ async function expandNode(nodeEl, autoExpandPath) {
if (!childrenEl.dataset.loaded) {
childrenEl.dataset.loaded = 'true';
const dirs = await window.api.listDirectories(nodeEl.dataset.path);
dirs.forEach(dir => childrenEl.appendChild(createNode(dir)));
if (dirs === null) {
const err = document.createElement('div');
err.className = 'tree-access-error';
err.textContent = '접근 불가';
childrenEl.appendChild(err);
} else {
dirs.forEach(dir => childrenEl.appendChild(createNode(dir)));
}
}
// Auto-expand toward the target path