mirror of
https://gitlab.com/cleanflash/installer.git
synced 2026-08-13 02:41:38 +08:00
Add installer / uninstaller for Linux
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
#[cfg(windows)]
|
||||
use crate::uninstaller;
|
||||
use std::fs;
|
||||
use std::path::Path;
|
||||
#[cfg(windows)]
|
||||
use std::thread;
|
||||
#[cfg(windows)]
|
||||
use std::time::Duration;
|
||||
|
||||
/// Attempt to delete a single file, retrying with escalating measures if needed.
|
||||
@@ -10,7 +13,8 @@ pub fn delete_file(path: &Path) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Unregister ActiveX .ocx files before deletion.
|
||||
// Unregister ActiveX .ocx files before deletion (Windows only).
|
||||
#[cfg(windows)]
|
||||
if let Some(ext) = path.extension() {
|
||||
if ext.eq_ignore_ascii_case("ocx") {
|
||||
let _ = uninstaller::unregister_activex(&path.to_string_lossy());
|
||||
|
||||
Reference in New Issue
Block a user