Unverified Commit 8136f6df authored by Duggan, John's avatar Duggan, John Committed by GitHub
Browse files

Reduce the number of subdirectories being queried (#115)

parent 9c03a9bb
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -47,6 +47,10 @@ class DataSelectorModel:

                if len(path_parts) > 1:
                    dirs.clear()
                elif path_parts != ["."]:
                    # Subdirectories are fully queried upon being opened, so we only need to query one item to determine
                    # if the target directory has any children.
                    dirs[:] = dirs[:1]

                # Only create a new entry for top-level directories
                if len(path_parts) == 1 and path_parts[0] != ".":  # This indicates a top-level directory