Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
5 changes: 5 additions & 0 deletions docs/src/content/docs/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed
- Fixed panic when closing or cancelling a `SaveFileDialog` on windows. Fixed in [PR](https://github.com/wailsapp/wails/pull/4284) by @hkhere


### Breaking Changes

- Renamed Service methods: `Name` -> `ServiceName`, `OnStartup` -> `ServiceStartup`, `OnShutdown` -> `ServiceShutdown` by [@leaanthony](https://github.com/leaanthony)
Expand Down Expand Up @@ -82,6 +86,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
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