-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot see hidden folders with runtime.OpenDirectoryDialog #2454
Comments
Yeah, good catch - showHiddenFiles works for both directories and files. However it's disabled for directory selection. Confirmed bug! |
Hi - I don't have the wherewithall to fix this, but I think I can see where it's happening (at least on macOS): In func (f *Frontend) OpenDirectoryDialog(options frontend.OpenDialogOptions) (string, error) {
results, err := f.openDialog(&options, false, false, true)
if err != nil {
return "", err
}
var selected string
if len(results) > 0 {
selected = results[0]
}
return selected, nil
} The But, if I follow the call stack, in -(void) OpenFileDialog :(NSString*)title :(NSString*)defaultFilename :(NSString*)defaultDirectory :(bool)allowDirectories :(bool)allowFiles :(bool)canCreateDirectories :(bool)treatPackagesAsDirectories :(bool)resolveAliases :(bool)showHiddenFiles :(bool)allowMultipleSelection :(NSString*)filters {
// <snip/>
// Filters - semicolon delimited list of file extensions
if( allowFiles ) {
// <snip/>
[dialog setAllowsMultipleSelection: allowMultipleSelection];
[dialog setShowsHiddenFiles: showHiddenFiles];
}
// </snip>
} So, as far as I can tell, because Would the fix be as simple as moving |
@davidnewhall |
Is your feature request related to a problem? Please describe.
Hello,
I want to select a hidden directory when using the
runtime.OpenDirectoryDialog
method, but they do not appear.Sample code:
None of the
.folders
in my home~
appear.Describe the solution you'd like
The
ShowHiddenFiles
member could also control hidden folders. I'd be fine with that, but even better would be a new member forShowHiddenFolders
.Describe alternatives you've considered
Could probably use a directory browser from another module, but have not tried.
Additional context
Testing on MacOS 12.6, go 1.19. Thanks!
The text was updated successfully, but these errors were encountered: