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 to get default download dir #81

Open
kaolpr opened this issue May 11, 2022 · 2 comments
Open

Failed to get default download dir #81

kaolpr opened this issue May 11, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@kaolpr
Copy link

kaolpr commented May 11, 2022

I'm getting the following error while trying to generate default config file:

>> library-loader-cli -g -u
Writing default config to "/home/ms/.config/LibraryLoader.toml"
thread 'main' panicked at 'Failed to get default download dir', ll-core/src/config/mod.rs:93:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

It seems to fail on dirs::download_dir function. According to Rust docs return value should depend on XDG_DOWNLOAD_DIR environment variable.

I verified if it's present and it was. To be sure I also tried running it with the path set explicitly:

>> XDG_DOWNLOAD_DIR=/home/ms/Downloads library-loader-cli -g -u
Writing default config to "/home/ms/.config/LibraryLoader.toml"
thread 'main' panicked at 'Failed to get default download dir', ll-core/src/config/mod.rs:93:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@olback olback self-assigned this May 11, 2022
@olback olback added the bug Something isn't working label May 11, 2022
@HavoK-at
Copy link

Had the same problem on Arch, it looks like that is an issue with the underlying xdg and dirs library.
In my case i fixed it by installing the xdg-user-dirs package and creating the default directories xdg expects with xdg-user-dirs-update. See https://wiki.archlinux.org/title/XDG_user_directories
I do not know if that is the correct way, but at least it seems to work now.

@olback
Copy link
Owner

olback commented Oct 9, 2022

Had the same problem on Arch, it looks like that is an issue with the underlying xdg and dirs library. In my case i fixed it by installing the xdg-user-dirs package and creating the default directories xdg expects with xdg-user-dirs-update. See https://wiki.archlinux.org/title/XDG_user_directories I do not know if that is the correct way, but at least it seems to work now.

This is indeed the correct way. I just kind of assumed that the usual XDG packages would be installed.

@kaolpr Can you confirm that this is resolved by installing xdg-user-dirs?

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