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

Create data folder if it does not exist #385

Closed
hamirmahal opened this issue Mar 1, 2024 · 3 comments · Fixed by #386
Closed

Create data folder if it does not exist #385

hamirmahal opened this issue Mar 1, 2024 · 3 comments · Fixed by #386

Comments

@hamirmahal
Copy link
Contributor

No description provided.

@hamirmahal
Copy link
Contributor Author

It can be a poor user experience if every time I exit numbat I see an error message about the history failing to save, without any automatic fixes or suggestions.

@hamirmahal
Copy link
Contributor Author

hamir@Laptop:~/numbat$  cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.21s
     Running `target/debug/numbat`

  █▄░█ █░█ █▀▄▀█ █▄▄ ▄▀█ ▀█▀    Numbat 1.10.1
  █░▀█ █▄█ █░▀░█ █▄█ █▀█ ░█░    https://numbat.dev/

>>>  cos (25 deg)

  cos(25 degree)

    = 0.906308 

>>> 
>>> 
Error while saving history to '/home/hamir/.local/share/numbat/history': No such file or directory (os error 2): No such file or directory (os error 2)
hamir@Laptop:~/numbat$  cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.20s
     Running `target/debug/numbat`

  █▄░█ █░█ █▀▄▀█ █▄▄ ▄▀█ ▀█▀    Numbat 1.10.1
  █░▀█ █▄█ █░▀░█ █▄█ █▀█ ░█░    https://numbat.dev/

>>>  cos (25 deg)

  cos(25 degree)

    = 0.906308 

>>> 
>>> 
Error while saving history to '/home/hamir/.local/share/numbat/history': No such file or directory (os error 2): No such file or directory (os error 2)

@hamirmahal
Copy link
Contributor Author

image

@sharkdp sharkdp changed the title try to create directories for history if they don't already exist Create data folder if it does not exist Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant