From b5f20848991cd392b2ce32a0d791c943137a2cbd Mon Sep 17 00:00:00 2001 From: xerox Date: Thu, 18 Jun 2020 06:06:00 +0000 Subject: [PATCH] Update loadup.hpp --- loadup.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/loadup.hpp b/loadup.hpp index 881daf3..db114d8 100644 --- a/loadup.hpp +++ b/loadup.hpp @@ -268,10 +268,11 @@ namespace driver const bool unload_drv = !reinterpret_cast(lp_nt_unload_drv)(&driver_reg_path_unicode); const auto image_path = util::get_service_image_path(service_name); - const bool delete_drv = std::filesystem::remove(image_path); + try { std::filesystem::remove(image_path); } + catch (std::exception& err) {} const bool delete_reg = util::delete_service_entry(service_name); - return unload_drv && delete_drv && delete_reg; + return unload_drv && delete_reg; } return false; }