Skip to content

TagSpaces is an offline, open source, document manager with tagging support

fix Can not open sub folders from tree after closing all locations

Stanimirea2768dc63b5
diff --git a/src/renderer/components/DirectoryTreeView.tsx b/src/renderer/components/DirectoryTreeView.tsx
index 4163af6e7..ea796964f 100644
--- a/src/renderer/components/DirectoryTreeView.tsx
+++ b/src/renderer/components/DirectoryTreeView.tsx
@@ -118,6 +118,11 @@ const DirectoryTreeView = forwardRef(
);
}
//loadSubDirectories(location);
+ } else if (!currentLocationId) {
+ setData(undefined);
+ if (isExpanded) {
+ setExpanded(false);
+ }
}
}, [data, currentLocationId, currentDirectoryEntries]);