jessfraz / gmailfilters

A tool to sync Gmail filters from a config file to your account.
MIT License
551 stars 33 forks source link

App doesn't work on Windows, can't save oauth token as /tmp/ doesn't exist #4

Closed jnsn closed 5 years ago

jnsn commented 5 years ago

By default, gmailfilters doesn't work on Windows, neither when using go get, nor with the Windows release builds.

The culprit is the save location of the authentication token file. The default is set to /tmp/token.json. https://github.com/jessfraz/gmailfilters/blob/a058aacd97a9b71028c51b4fba4ea18882c6f52f/main.go#L21

It might be better if this is constructed using the https://golang.org/pkg/os/#TempDir method to get a system independent temp folder.