Fix canonicalization adding files with empty name
This commit is contained in:
parent
2eb37aa07a
commit
6d8b16b011
@ -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::<Vec<_>>();
|
||||
|
||||
@ -236,6 +237,7 @@ fn main() -> Result<(), String> {
|
||||
.into_iter()
|
||||
.flatten()
|
||||
.collect();
|
||||
log!(logger, debug, "canonical files: {files:?}");
|
||||
}
|
||||
ServerAddress::Localhost => files
|
||||
.iter()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user