Small refactoring, handle invalid UTF-8 filenames

This commit is contained in:
sharkdp
2020-04-21 08:19:24 +02:00
committed by David Peter
parent 83d408bab3
commit 34619a2e89
5 changed files with 47 additions and 25 deletions

View File

@ -36,7 +36,7 @@ impl<'b> Controller<'b> {
if self.config.paging_mode != PagingMode::Never {
let call_pager = self.config.files.iter().any(|file| {
if let InputFile::Ordinary(ofile) = file {
return Path::new(ofile.filename()).exists();
return Path::new(ofile.provided_path()).exists();
} else {
return true;
}