From 1e77b878b58423c6c81f6a09c2efaeab6e1de632 Mon Sep 17 00:00:00 2001 From: Nuno Cruces Date: Wed, 7 Feb 2024 19:05:07 +0000 Subject: [PATCH] Reorder. --- file_windows.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/file_windows.go b/file_windows.go index 5b3a9c5..bff5d6c 100644 --- a/file_windows.go +++ b/file_windows.go @@ -130,13 +130,13 @@ func selectFileMultiple(opts options) ([]string, error) { } func selectFileSave(opts options) (string, error) { + if opts.directory { + return selectFile(opts) + } name, shown, err := fileSaveDialog(opts) if shown || opts.ctx != nil && opts.ctx.Err() != nil { return name, err } - if opts.directory { - return selectFile(opts) - } var args win.OPENFILENAME args.StructSize = uint32(unsafe.Sizeof(args))