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
|
let denoted_files = output
|
||||||
.stdout
|
.stdout
|
||||||
.split(|&b| b == b'\n') //split at line breaks
|
.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)))
|
.map(|bytes| PathBuf::from(OsStr::from_bytes(bytes)))
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
@ -236,6 +237,7 @@ fn main() -> Result<(), String> {
|
|||||||
.into_iter()
|
.into_iter()
|
||||||
.flatten()
|
.flatten()
|
||||||
.collect();
|
.collect();
|
||||||
|
log!(logger, debug, "canonical files: {files:?}");
|
||||||
}
|
}
|
||||||
ServerAddress::Localhost => files
|
ServerAddress::Localhost => files
|
||||||
.iter()
|
.iter()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user