diff --git a/Sources/FilePicker/FilePicker.swift b/Sources/FilePicker/FilePicker.swift index 8febfe1..68a3e0c 100644 --- a/Sources/FilePicker/FilePicker.swift +++ b/Sources/FilePicker/FilePicker.swift @@ -83,7 +83,7 @@ public struct FilePicker: View { if presented == true { let panel = NSOpenPanel() panel.allowsMultipleSelection = allowMultiple - panel.canChooseDirectories = false + panel.canChooseDirectories = types.contains(.directory) // should be able to choose directories it the type is included panel.canChooseFiles = true panel.allowedFileTypes = types.map { $0.identifier } panel.begin { reponse in