Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
Skip hidden files in repository listing
Alexis Sellier committed 3 years ago
commit 71cf289c52aa92af8c232072f889b08770205e35
parent e103ffbb95159c58e4f6d7c24db3dec1fed98b86
1 file changed +9 -0
modified radicle/src/storage/git.rs
@@ -140,6 +140,15 @@ impl Storage {

        for result in fs::read_dir(&self.path)? {
            let path = result?;
+

+
            // Skip non-directories.
+
            if !path.file_type()?.is_dir() {
+
                continue;
+
            }
+
            // Skip hidden files.
+
            if path.file_name().to_string_lossy().starts_with('.') {
+
                continue;
+
            }
            let rid = Id::try_from(path.file_name()).map_err(|_| Error::Id(path.file_name()))?;
            let repo = self.repository(rid)?;