Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/src/content/docs/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
-  Add File Association support for mac by [@wimaha](https://github.com/wimaha) in [#4177](https://github.com/wailsapp/wails/pull/4177)
- Add `wails3 tool version` for semantic version bumping by [@leaanthony](https://github.com/leaanthony)
- Add badging support for macOS and Windows by [@popaprozac](https://github.com/popaprozac) in [#](https://github.com/wailsapp/wails/pull/4234)

### Fixed

- Fixed Windows+Linux Edit Menu issues by [@leaanthony](https://github.com/leaanthony) in [#3f78a3a](https://github.com/wailsapp/wails/commit/3f78a3a8ce7837e8b32242c8edbbed431c68c062)
Expand Down Expand Up @@ -127,6 +128,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed system trays not showing after taskbar restarts by [@leaanthony](https://github.com/leaanthony) based on work by @kron.
- Fixed fallbackResponseWriter not implementing Flush() in [#4245](https://github.com/wailsapp/wails/pull/4245)
- Fixed fallbackResponseWriter not implementing Flush() by [@superDingda] in [#4236](https://github.com/wailsapp/wails/issues/4236)
- Fixed panic when closing or cancelling a `SaveFileDialog` on windows. Fixed in [PR](https://github.com/wailsapp/wails/pull/4284) by @hkhere


### Changed

Expand Down
5 changes: 3 additions & 2 deletions v3/internal/go-common-file-dialog/cfd/vtblCommonFunc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ package cfd

import (
"fmt"
"github.com/go-ole/go-ole"
"strings"
"syscall"
"unsafe"

"github.com/go-ole/go-ole"
)

func hresultToError(hr uintptr) error {
Expand Down Expand Up @@ -168,7 +169,7 @@ func (vtbl *iFileDialogVtbl) getResultString(objPtr unsafe.Pointer) (string, err
return "", err
}
if shellItem == nil {
return "", fmt.Errorf("shellItem is nil")
return "", ErrorCancelled
}
defer shellItem.vtbl.release(unsafe.Pointer(shellItem))
return shellItem.vtbl.getDisplayName(unsafe.Pointer(shellItem))
Expand Down
9 changes: 8 additions & 1 deletion v3/pkg/application/dialogs_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,16 @@ func (m *windowSaveFileDialog) show() (chan string, error) {
func() (cfd.Dialog, error) {
return cfd.NewSaveFileDialog(config)
}, false)
if err != nil {
close(files)
return files, err
}
go func() {
defer handlePanic()
files <- result.(string)
f, ok := result.(string)
if ok {
files <- f
}
close(files)
}()
return files, err
Expand Down
Loading