zenity.SelectFileSave adds a \n character
Closed this issue · 3 comments
SolarLune commented
Hello!
This is weird, but when I call zenity.SelectFileSave()
, it adds a newline character at the end of the filepath returned by the function, regardless of what I type in for the filename. Here's a quick test:
package main
import (
"fmt"
"github.com/ncruces/zenity"
)
func main() {
filename, err := zenity.SelectFileSave()
if err != nil {
panic(err)
}
fmt.Println(fmt.Sprintf("%q", filename))
}
And here's the output with a saved file named test
:
"/home/solarlune/Documents/Projects/Go/Tests/zenity/test\n"
This is a fresh project with freshly go get
ted zenity, Pop OS 20.10, go version 1.16.2.
ncruces commented
Tagged as v0.7.4.
Will do the release shortly, but it should be available through go get
.
SolarLune commented
Fantastic. Thanks a lot for the prompt fix; really appreciate it!