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

Failed creating setting storage : no such directory #2023

Closed
qjson opened this issue Feb 24, 2021 · 3 comments
Closed

Failed creating setting storage : no such directory #2023

qjson opened this issue Feb 24, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@qjson
Copy link

qjson commented Feb 24, 2021

Describe the bug:

When starting the fyne_demo program on Ubuntu 20.04 I get the following error (real name hidden):

2021/02/24 14:53:59 Fyne error:  Unable to create settings storage:
2021/02/24 14:53:59   Cause: mkdir /home/xxx/.config/fyne/io.fyne.demo: no such file or directory
2021/02/24 14:53:59   At: /home/xxx/go/src/fyne.io/fyne/v2/app/settings_desktop.go:30
2021/02/24 14:53:59 Fyne error:  Settings watch error:
2021/02/24 14:53:59   Cause: no such file or directory
2021/02/24 14:53:59   At: /home/xxx/go/src/fyne.io/fyne/v2/app/settings_desktop.go:19

The reason is because fyne/app/v2/settings_desktop.go:28 in branch 2.0.x contains err := os.Mkdir(dir, 0700).

The required change to fix it: Change line into err := os.MkdirAll(dir, 0700). This will create all the missing directories in the path if they don’t exist.

I don’t know how to provide a PR because I’m new to fyne and still a bit confused by the code organization (branches).

To Reproduce:

Steps to reproduce the behavior:

  1. Erase or rename the ~/.config/fyne directory I didn’t have.
  2. Start fyne_demo installed by this command go get fyne.io/fyne/v2/cmd/fyne_demo as suggested in the documentation.
  3. See error

Device (please complete the following information):

  • OS: Linux
  • Version: Ubuntu 20.04
  • Go version: go1.15.7 and
  • Fyne version: v2.0.0 (don’t know where to find it) got it by doinq git tag in ~/go/src/fyne.io/fyne/v2
@qjson qjson added the bug Something isn't working label Feb 24, 2021
chmike added a commit to chmike/fyne that referenced this issue Feb 24, 2021
@andydotxyz
Copy link
Member

Thanks, merged to develop and will be in v2.0.1 release.

@eopeter
Copy link

eopeter commented Oct 3, 2023

this issue does not seem to be resolved even with latest version. Happens when app ran without sudo on a workstation not owned by the developer

@andydotxyz
Copy link
Member

It was resolved, some time ago. What version are you using? Are you running as a user that has access to their own home directory?

Probably best is to open a new bug with your details instead of commenting on this 3 year old one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants