dirs-dev / dirs-rs

a low-level library that provides config/cache/data paths, following the respective conventions on Linux, macOS and Windows

Home Page:https://dirs.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect `config_dir` on Windows 10

SenojLuap opened this issue · comments

Not sure if I'm doing something wrong or what, but I'm consistently getting "C:\" from config_dir() when running on Windows 10. This happens both in develop builds and release builds.

I'd be happy to provide more info, but I'm not sure what info would be helpful.

commented

Hey @SenojLuap,

could you provide the output of all functions (similar to https://github.com/dirs-dev/dirs-rs/blob/main/src/lib.rs#L292) as well as the version of Windows you are using?

Thanks,

Simon

Dammit, I'm an idiot.

Turns out it was my own fault. I was using the resulting PathBuf incorrectly, and it was clearing out the value from config_dir().

Sorry for the false alarm.

commented

No worries! Glad that things worked out for you! :-)