This commit is contained in:
Nuno Cruces 2024-02-07 19:05:07 +00:00
parent 903df781a8
commit 1e77b878b5

View file

@ -130,13 +130,13 @@ func selectFileMultiple(opts options) ([]string, error) {
} }
func selectFileSave(opts options) (string, error) { func selectFileSave(opts options) (string, error) {
if opts.directory {
return selectFile(opts)
}
name, shown, err := fileSaveDialog(opts) name, shown, err := fileSaveDialog(opts)
if shown || opts.ctx != nil && opts.ctx.Err() != nil { if shown || opts.ctx != nil && opts.ctx.Err() != nil {
return name, err return name, err
} }
if opts.directory {
return selectFile(opts)
}
var args win.OPENFILENAME var args win.OPENFILENAME
args.StructSize = uint32(unsafe.Sizeof(args)) args.StructSize = uint32(unsafe.Sizeof(args))