[GH-ISSUE #128] "Failed to create config dir" #96

Closed
opened 2026-02-28 14:30:34 +03:00 by kerem · 2 comments
Owner

Originally created by @aaronpkelly on GitHub (Aug 20, 2021).
Original GitHub issue: https://github.com/jpochyla/psst/issues/128

I've built psst in a docker container, and I can start the psst-gui app just fine:

user@nixos:/app/psst/psst-gui$ cargo run
   Compiling psst-gui v0.1.0 (/app/psst/psst-gui)
warning: associated function is never used: `channels`
  --> psst-core/src/audio_decode.rs:59:8
   |
59 |     fn channels(&self) -> u8 {
   |        ^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: associated function is never used: `sample_rate`
  --> psst-core/src/audio_decode.rs:63:8
   |
63 |     fn sample_rate(&self) -> u32 {
   |        ^^^^^^^^^^^

warning: 2 warnings emitted

warning: use of deprecated constant `druid::commands::HIDE_APPLICATION`: HIDE_APPLICATION is only supported on macOS
  --> psst-gui/src/ui/menu.rs:32:26
   |
32 |                 .command(commands::HIDE_APPLICATION)
   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: associated function is never used: `ctx`
  --> psst-gui/src/data/ctx.rs:30:12
   |
30 |     pub fn ctx() -> impl Lens<Self, C> {
   |            ^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: associated function is never used: `is_cached`
  --> psst-gui/src/data/utils.rs:34:12
   |
34 |     pub fn is_cached(&self) -> bool {
   |            ^^^^^^^^^

warning: variant is never constructed: `Stroke`
   --> psst-gui/src/widget/icons.rs:118:5
    |
118 |     Stroke { width: f64 },
    |     ^^^^^^^^^^^^^^^^^^^^^

warning: 4 warnings emitted

    Finished dev [unoptimized + debuginfo] target(s) in 18.74s
     Running `/app/psst/target/debug/psst-gui`

However, when I am on the Preferences screen, and I click save, the application panics:

thread 'main' panicked at 'Failed to create config dir: Os { code: 2, kind: NotFound, message: "No such file or directory" }', psst-gui/src/data/config.rs:120:35
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Why can't it create the config dir? Where is it trying to create this dir?

Originally created by @aaronpkelly on GitHub (Aug 20, 2021). Original GitHub issue: https://github.com/jpochyla/psst/issues/128 I've built psst in a docker container, and I can start the psst-gui app just fine: ``` user@nixos:/app/psst/psst-gui$ cargo run Compiling psst-gui v0.1.0 (/app/psst/psst-gui) warning: associated function is never used: `channels` --> psst-core/src/audio_decode.rs:59:8 | 59 | fn channels(&self) -> u8 { | ^^^^^^^^ | = note: `#[warn(dead_code)]` on by default warning: associated function is never used: `sample_rate` --> psst-core/src/audio_decode.rs:63:8 | 63 | fn sample_rate(&self) -> u32 { | ^^^^^^^^^^^ warning: 2 warnings emitted warning: use of deprecated constant `druid::commands::HIDE_APPLICATION`: HIDE_APPLICATION is only supported on macOS --> psst-gui/src/ui/menu.rs:32:26 | 32 | .command(commands::HIDE_APPLICATION) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(deprecated)]` on by default warning: associated function is never used: `ctx` --> psst-gui/src/data/ctx.rs:30:12 | 30 | pub fn ctx() -> impl Lens<Self, C> { | ^^^ | = note: `#[warn(dead_code)]` on by default warning: associated function is never used: `is_cached` --> psst-gui/src/data/utils.rs:34:12 | 34 | pub fn is_cached(&self) -> bool { | ^^^^^^^^^ warning: variant is never constructed: `Stroke` --> psst-gui/src/widget/icons.rs:118:5 | 118 | Stroke { width: f64 }, | ^^^^^^^^^^^^^^^^^^^^^ warning: 4 warnings emitted Finished dev [unoptimized + debuginfo] target(s) in 18.74s Running `/app/psst/target/debug/psst-gui` ``` However, when I am on the Preferences screen, and I click save, the application panics: ``` thread 'main' panicked at 'Failed to create config dir: Os { code: 2, kind: NotFound, message: "No such file or directory" }', psst-gui/src/data/config.rs:120:35 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` Why can't it create the config dir? Where is it trying to create this dir?
kerem closed this issue 2026-02-28 14:30:35 +03:00
Author
Owner

@jpochyla commented on GitHub (Aug 20, 2021):

On Linux it uses ~/.config/ as the base, I guess it's missing on your system?

<!-- gh-comment-id:902755128 --> @jpochyla commented on GitHub (Aug 20, 2021): On Linux it uses `~/.config/` as the base, I guess it's missing on your system?
Author
Owner

@aaronpkelly commented on GitHub (Aug 20, 2021):

That was it! I had to create a $HOME/.config folder for my user. Thanks @jpochyla!

<!-- gh-comment-id:902799515 --> @aaronpkelly commented on GitHub (Aug 20, 2021): That was it! I had to create a `$HOME/.config` folder for my user. Thanks @jpochyla!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/psst#96
No description provided.