Instead of creating missing directories in the TryFrom<PathBuf> for Home, this commit will return Errors when there are issues with the
folder structure.
radicle: Add a load method to radicle::profile::Home
Home::new always creates the missing subdirectories, in some cases
where we only want a valid Home we need to fail and know that there
isn’t a valid radicle::profile::Home at a specific path.
Instead of creating missing directories in the TryFrom<PathBuf> for Home, this commit will return Errors when there are issues with the
folder structure.
radicle: Add a load method to radicle::profile::Home
Home::new always creates the missing subdirectories, in some cases
where we only want a valid Home we need to fail and know that there
isn’t a valid radicle::profile::Home at a specific path.
REVIEW
Remove TryFrom since it is confusing, and will force the API user to choose new or load.
This means the caller can check the home they are passing in to see if it’s empty and call new.
Squashed and added the review commits by fintan, also rebased the patch
Changes:
- Rebase
- Document methods that return directory paths
- Canonicalize before checking for existence
Rebase