Skip to content

Commit

Permalink
Merge pull request #77 from victor-wei126/main
Browse files Browse the repository at this point in the history
add default data path for unix to README and comments
  • Loading branch information
carver authored Aug 19, 2021
2 parents 575a8f9 + 34fba5c commit 9edb480
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,12 @@ cargo run -p trin-state|trin-history

**Optional:** Custom data directory
```shell
TRIN_DATA_PATH="/path"
TRIN_DATA_PATH="/your_path"
```
*Note, default data paths are:*\
Linux/Unix - `$HOME/.local/share/trin`\
MacOS - `~/Library/Application Support/Trin`\
Windows - `C:\Users\Username\AppData\Roaming\Trin\data`

### Connect over IPC
In a python shell:
Expand Down
2 changes: 1 addition & 1 deletion trin-core/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub fn get_data_dir() -> String {
pub fn get_default_data_dir() -> String {
// Windows: C:\Users\Username\AppData\Roaming\Trin\data
// macOS: ~/Library/Application Support/Trin
// Unix-like: ~/.trin
// Unix-like: $HOME/.local/share/trin

match ProjectDirs::from("", "", "Trin") {
Some(proj_dirs) => proj_dirs.data_local_dir().to_str().unwrap().to_string(),
Expand Down

0 comments on commit 9edb480

Please # to comment.