리펙토링: 전체 구조 검토, 개선
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user