Skip to content

Commit

Permalink
Fix bug in truncation of too long log filenames.
Browse files Browse the repository at this point in the history
  • Loading branch information
vakaras committed Dec 5, 2020
1 parent 864ff56 commit ee5def9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prusti-common/src/report/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub fn build_writer<S: ToString>(namespace: &str, name: S) -> io::Result<Box<dyn
fs::create_dir_all(&path)?;
let mut name_string = name.to_string();
if name_string.len() > config::max_log_file_name_length() {
let end = name_string.find('.').unwrap();
let end = name_string.rfind('.').unwrap();
let start = end - (name_string.len() - config::max_log_file_name_length());
name_string.drain(start..end);
}
Expand Down

0 comments on commit ee5def9

Please sign in to comment.