Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
radicle: Change `TryFrom` for `radicle::profile::Home` to `Home::load`
Merged did:key:z6MkkfM3...sVz5 opened 5 months ago

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.

did:key:z6MkkfM3...sVz5 opened with revision 4291dda5 on base 6d0c571e +25 -1 5 months ago

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.

fintohaps pushed revision 2 2ee4a43b on base 6d0c571e +50 -9 5 months ago

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.

did:key:z6MkkfM3...sVz5 pushed revision 3 69d4202f on base 37d4ae4a +50 -9 4 months ago

Squashed and added the review commits by fintan, also rebased the patch

levitte accepted 3 months ago
fintohaps pushed revision 4 0ff68c5e on base 1b986af0 +62 -9 1 month ago

Changes:

  • Rebase
  • Document methods that return directory paths
  • Canonicalize before checking for existence
lorenz pushed revision 5 113cf649 on base ff85c74e +62 -9 1 month ago

Rebase

lorenz merged revision 113cf649 at 9dbbb01d 1 month ago