Skip to content

Commit

Permalink
Merge branches 'ray/base-directory-windows-local' (#1368) and 'ray/ba…
Browse files Browse the repository at this point in the history
…se-directory-organizations' (#1369) into maint-0.15

* ray/base-directory-windows-local:
  changelog: add #1368
  apps/config: use non-roaming profile on Windows

* ray/base-directory-organizations:
  changelog: add #1369
  apps/cli: update default data dirs in cli help
  apps/config: upcase "Namada" for data directories
  apps/config: use blank domain and organization
  • Loading branch information
juped committed May 15, 2023
3 parents 0060e0f + 02a3345 + d86f3d1 commit a0eadb9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Place the default data directory in the local rather than the roaming profile
on Windows. ([#1368](https://github.com/anoma/namada/pull/1368))
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Use blank qualifier and organization, and upcased Namada, to
construct default base directories on Mac and Windows platforms.
([#1369](https://github.com/anoma/namada/pull/1369))
7 changes: 4 additions & 3 deletions apps/src/lib/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1817,9 +1817,10 @@ pub mod args {
configuration and state is stored. This value can also \
be set via `NAMADA_BASE_DIR` environment variable, but \
the argument takes precedence, if specified. Defaults to \
`$XDG_DATA_HOME/com.heliax.namada` or \
`$HOME/.local/share/com.heliax.namada` depending on the \
operating system (former is linux, latter is osx).",
`$XDG_DATA_HOME/namada` (`$HOME/.local/share/namada` \
where `XDG_DATA_HOME` is unset) on \
Unix,`$HOME/Library/Application Support/Namada` on \
Mac,and `%AppData%\\Namada` on Windows.",
))
.arg(WASM_DIR.def().about(
"Directory with built WASM validity predicates, \
Expand Down
4 changes: 2 additions & 2 deletions apps/src/lib/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,8 @@ impl Config {
}

pub fn get_default_namada_folder() -> PathBuf {
if let Some(project_dir) = ProjectDirs::from("com", "heliax", "namada") {
project_dir.data_dir().to_path_buf()
if let Some(project_dir) = ProjectDirs::from("", "", "Namada") {
project_dir.data_local_dir().to_path_buf()
} else {
DEFAULT_BASE_DIR.into()
}
Expand Down

0 comments on commit a0eadb9

Please sign in to comment.