diff --git a/src/server/report.rs b/src/server/report.rs index 2889bd1d..ebe035e3 100644 --- a/src/server/report.rs +++ b/src/server/report.rs @@ -134,6 +134,7 @@ fn get_directory_content(path: impl AsRef) -> String { } }; let mut out = String::new(); + let mut first = true; for entry in read_dir_iter { let entry = match entry { Ok(entry) => entry, @@ -144,7 +145,12 @@ fn get_directory_content(path: impl AsRef) -> String { }; let path = entry.path(); if path.is_file() { - let _ = writeln!(out, "{}", get_file_content(path)); + if first { + let _ = writeln!(out, "{}", get_file_content(path)); + first = false; + } else { + let _ = writeln!(out, "\n{}", get_file_content(path)); + } } else { let _ = writeln!(out, "skipping sub-directory `{}`", path.display()); }