diff options
-rw-r--r-- | src/files.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/files.rs b/src/files.rs index 555e8ae..2ba9a9f 100644 --- a/src/files.rs +++ b/src/files.rs @@ -200,6 +200,7 @@ async fn index(path: &Path, rpath: String) -> Result<String, ServiceError> { let files = path .read_dir()? .map(|e| e.and_then(|e| Ok((e.file_name().into_string().unwrap(), e.metadata()?)))) + .filter(|e| e.as_ref().map(|(e, _)| !e.starts_with(".")).unwrap_or(true)) .collect::<Result<Vec<_>, _>>()?; if let Ok(indexhtml) = read_to_string(path.join("index.html")).await { Ok(indexhtml) |