Skip to content
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

Unable to overwrite file with FileSaveDialog #1396

Closed
PucklaJ opened this issue Oct 12, 2020 · 1 comment
Closed

Unable to overwrite file with FileSaveDialog #1396

PucklaJ opened this issue Oct 12, 2020 · 1 comment
Labels
blocker Items that would block a forthcoming release bug Something isn't working

Comments

@PucklaJ
Copy link
Contributor

PucklaJ commented Oct 12, 2020

Describe the bug:

When trying to overwrite any file using a dialog.FileSave an error message saying Files cannot replace a directory, check the file name and try again is displayed. This has probably to do with #1379.

To Reproduce:

Steps to reproduce the behaviour:

  1. Create a new dialog.FileSave
  2. Click on any existing file
  3. Click Save
  4. See the error message

Example code:

package main

import (
	"fyne.io/fyne"
	"fyne.io/fyne/app"
	"fyne.io/fyne/dialog"
	"fyne.io/fyne/widget"
)

func main() {
	a := app.New()
	w := a.NewWindow("DialogTest")

	w.SetContent(widget.NewButton("Dialog", func() {
		dialog.ShowFileSave(func(writer fyne.URIWriteCloser, err error) {
			if writer == nil {
				return
			}
			if err != nil {
				dialog.ShowError(err, w)
				return
			}
			defer writer.Close()

			dialog.ShowInformation("File", writer.URI().String(), w)
		}, w)
	}))

	w.ShowAndRun()
	a.Quit()
}

Device (please complete the following information):

  • OS: Windows 10
  • Go version: 1.15.2
  • Fyne version: v1.3.4-0.20201011201116-228c0cf7fcac
@andydotxyz andydotxyz added blocker Items that would block a forthcoming release bug Something isn't working labels Oct 12, 2020
@andydotxyz
Copy link
Member

Thanks for the fix @PucklaMotzer09 that's on develop now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Items that would block a forthcoming release bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants