Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
radicle: Skip invalid named folders
✗ CI failure Sebastian Martinez committed 5 months ago
commit d5b734518e2048705f91701873fe1b8959c8b5f2
parent 0ec084fc232f0df8c1bbcbb89ce8394e8a81d988
2 passed 1 failed 1 pending (4 total) View logs
1 file changed +4 -2
modified crates/radicle/src/storage/git.rs
@@ -132,8 +132,10 @@ impl ReadStorage for Storage {
                    continue;
                }
            }
-
            let rid = RepoId::try_from(path.file_name())
-
                .map_err(|_| Error::InvalidId(path.file_name()))?;
+
            let Ok(rid) = RepoId::try_from(path.file_name()) else {
+
                log::warn!(target: "storage", "Repository folder {} is not a valid Repository ID", path.file_name().to_string_lossy());
+
                continue;
+
            };

            let repo = match self.repository(rid) {
                Ok(repo) => repo,