Commit 9f265d65 authored by Duggan, John's avatar Duggan, John
Browse files

Add using_custom_directory check to get_datafiles

parent f99bce80
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -173,9 +173,10 @@ class NeutronDataSelectorModel(DataSelectorModel):
        return self.get_directories_from_path(base_path)

    def get_datafiles(self) -> List[str]:
        using_custom_directory = self.state.facility == CUSTOM_DIRECTORIES_LABEL
        if self.state.experiment:
            base_path = Path("/") / self.state.facility / self.get_instrument_dir() / self.state.experiment
        elif self.state.custom_directory:
        elif using_custom_directory and self.state.custom_directory:
            base_path = Path(self.state.custom_directory)
        else:
            return []