mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
Fix UI errors when selecting directories in file browser
It was only checking if it's existing path but wasn't checking whether it's a file, therefore directories with suffixes were slipping in and then failing during `IfcHeaderExtractor(filepath)`.
This commit is contained in:
@@ -50,7 +50,7 @@ class IFCFileSelector:
|
||||
path = self.get_filepath_abs()
|
||||
else:
|
||||
path = Path(filepath)
|
||||
return path.exists() and "ifc" in path.suffix.lower()
|
||||
return path.exists() and path.is_file() and "ifc" in path.suffix.lower()
|
||||
|
||||
def get_filepath_abs(self) -> Path:
|
||||
# self.filepath filled by fileselect_add is absolute
|
||||
|
||||
Reference in New Issue
Block a user