library-loader icon indicating copy to clipboard operation
library-loader copied to clipboard

Failed to get default download dir

Open kaolpr opened this issue 2 years ago • 2 comments

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

kaolpr avatar May 11 '22 19:05 kaolpr

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.

HavoK-at avatar Jun 16 '22 18:06 HavoK-at

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?

olback avatar Oct 09 '22 13:10 olback