Skip to content

Commit 88198b9

Browse files
committed
[rust] Bug-fix: avoid to download safaridriver and clear lock parent folder (#15775)
1 parent 4fc2582 commit 88198b9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

rust/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ pub trait SeleniumManager {
875875
self.get_driver_version()
876876
));
877877
}
878-
} else {
878+
} else if !self.is_safari() {
879879
// If driver is not in the cache, download it
880880
self.assert_online_or_err(OFFLINE_DOWNLOAD_ERR_MSG)?;
881881
self.download_driver()?;

rust/src/lock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pub fn clear_lock_if_required() {
7474
if lock_path.is_some() {
7575
let lock = lock_path.unwrap();
7676
if lock.exists() {
77-
fs::remove_dir_all(lock.parent().unwrap()).unwrap_or_default();
77+
fs::remove_file(lock).unwrap_or_default();
7878
}
7979
}
8080
}

0 commit comments

Comments
 (0)