Skip to content

Commit

Permalink
feat: relocate config.json to XDG-compliant directory
Browse files Browse the repository at this point in the history
This commit changes the default location of the `config.json`
configuration file for patch-hub to `~/.config/patch-hub/config.json`
from its previous location at `~/.local/share/patch-hub/config.json`.
This relocation ensures compliance with XDG Base Directory standards.

Closes: #73

[Maintainer edits]
- Remove problematic test due to nature of being unstable to suite.

Signed-off-by: gabrielsrd <[email protected]>
Reviewed-by: David Tadokoro <[email protected]>
Signed-off-by: David Tadokoro <[email protected]>
  • Loading branch information
Gabriel Alves authored and davidbtadokoro committed Oct 31, 2024
1 parent c33c428 commit 8f7a6dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl Config {
}

let config_path = format!(
"{}/.local/share/patch_hub/config.json",
"{}/.config/patch-hub/config.json",
env::var("HOME").unwrap()
);
if Path::new(&config_path).is_file() {
Expand Down Expand Up @@ -153,7 +153,7 @@ impl Config {
path
} else {
format!(
"{}/.local/share/patch_hub/config.json",
"{}/.config/patch-hub/config.json",
env::var("HOME").unwrap()
)
};
Expand Down

0 comments on commit 8f7a6dc

Please sign in to comment.