From 6d8b16b011fc37c5a455c649010fe17da5214811 Mon Sep 17 00:00:00 2001 From: Steppy Date: Mon, 3 Feb 2025 13:14:40 +0100 Subject: [PATCH] Fix canonicalization adding files with empty name --- src/main.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.rs b/src/main.rs index 30dde00..6c66e3d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -227,6 +227,7 @@ fn main() -> Result<(), String> { let denoted_files = output .stdout .split(|&b| b == b'\n') //split at line breaks + .filter(|bytes| !bytes.is_empty()) //needed since realpath sometimes gives us empty lines .map(|bytes| PathBuf::from(OsStr::from_bytes(bytes))) .collect::>(); @@ -236,6 +237,7 @@ fn main() -> Result<(), String> { .into_iter() .flatten() .collect(); + log!(logger, debug, "canonical files: {files:?}"); } ServerAddress::Localhost => files .iter()