Skip to content

Commit

Permalink
[rust] Include html extension for logging content when wrong driver d…
Browse files Browse the repository at this point in the history
…ownload
  • Loading branch information
bonigarcia committed Jun 18, 2023
1 parent 65d2cc6 commit d1abe67
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rust/src/files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const CACHE_FOLDER: &str = ".cache/selenium";
const ZIP: &str = "zip";
const GZ: &str = "gz";
const XML: &str = "xml";
const HTML: &str = "html";

#[derive(Hash, Eq, PartialEq, Debug)]
pub struct BrowserPath {
Expand Down Expand Up @@ -77,7 +78,7 @@ pub fn uncompress(
unzip(file, target, log)?
} else if extension.eq_ignore_ascii_case(GZ) {
untargz(file, target, log)?
} else if extension.eq_ignore_ascii_case(XML) {
} else if extension.eq_ignore_ascii_case(XML) || extension.eq_ignore_ascii_case(HTML) {
log.debug(format!(
"Wrong downloaded driver: {}",
fs::read_to_string(compressed_file).unwrap_or_default()
Expand Down

0 comments on commit d1abe67

Please sign in to comment.