-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: use OS-specific config & data dirs, default iroh-store dir #218
Conversation
1616340
to
2df6113
Compare
match arg_path { | ||
Some(p) => Ok(p), | ||
None => iroh_data_path("store"), | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unclear on weather or not there's a more succinct way to express this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think arg_path.map_or(iroh_data_path("store"), |v| Ok(v))
is equivalent - but not easier to read!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oooh I hadn't found map_or
. Thanks for the tip @fabricedesre! I agree with you that the match
is easier to read, and will leave it as is unless I'm overruled by dig 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems fine and readable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good from the ops side too. All of the deployment stuff is hardwired to avoid sudden config changes like this.
switch to using https://dirs.dev standard application directories instead of $HOME/.iroh iroh-store now uses a default directory for datastore data instead of explicitly requiring a store path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
switch to using https://dirs.dev/ standard application directories instead of $HOME/.iroh
iroh-store now uses a default directory for writing rocksDB files instead of explicitly requiring a store path. Defaults to
/iroh/store
within the OS application data directory.closes n0-computer/beetle#231