directories-rs icon indicating copy to clipboard operation
directories-rs copied to clipboard

add `config_local_dir` (issue #68)

Open ReactorScram opened this issue 3 years ago • 2 comments

Adds a local config dir which is identical to config_dir on Linux and Mac. On Windows it uses AppData/Local instead of AppData/Roaming.

I only ran the tests on Linux cause I don't know how CI works and I don't have a Mac / Win system handy.

ReactorScram avatar Dec 16 '21 21:12 ReactorScram

Hi @ReactorScram,

thanks for your PR!

Usually I'd require that the function provides behavior that is present on at least one of the supported platforms (and especially with the "local" vs. "roaming" stuff we just fill in the gaps as best as I can elsewhere).

I have to think further how/if we can make sense of this.

Cheers,

Simon

soc avatar Dec 18 '21 21:12 soc

So it's not normal for Windows programs to keep system-specific config in AppData/Local like this?

I also realized, this is actually a Rust implementation of the JVM directories library, right? So I can see why you wouldn't want their APIs to desync.

ReactorScram avatar Dec 18 '21 21:12 ReactorScram

@soc friendly ping.

Currently directories offers no way to get a non-syncing config directory.

Usually I'd require that the function provides behavior that is present on at least one of the supported platforms

Is that not fulfilled? C:\Users\Alice\AppData\Local\Foo Corp\Bar App\config isn't covered by any other method but is present on Windows.

daxpedda avatar Aug 25 '22 13:08 daxpedda

@ReactorScram and @daxpedda makes sense. I will merge this and roll a new release after I come back from vacation. Thanks!

soc avatar Aug 31 '22 10:08 soc

Merged, thanks @ReactorScram and @daxpedda!

soc avatar Sep 12 '22 09:09 soc