[bug] Mount state is not being removed after unmount on Windows #65
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
### Issues
|
||||
|
||||
* \#21 [unit test] Complete WinFSP unit tests
|
||||
* \#65 [bug] Mount state is not being removed after unmount on Windows
|
||||
|
||||
## v2.1.0-rc
|
||||
|
||||
|
||||
@@ -174,10 +174,11 @@ auto lock_data::set_mount_state(bool active, std::string_view mount_location,
|
||||
if (mount_location.empty() && not active) {
|
||||
::RegCloseKey(key);
|
||||
|
||||
if (::RegCreateKeyExA(HKEY_CURRENT_USER,
|
||||
create_lock_key(dir_id_, mutex_id_).c_str(), 0,
|
||||
nullptr, 0, KEY_ALL_ACCESS, nullptr, &key,
|
||||
nullptr) != ERROR_SUCCESS) {
|
||||
if (::RegCreateKeyExA(
|
||||
HKEY_CURRENT_USER,
|
||||
fmt::format(R"(SOFTWARE\{}\Lock\{})", REPERTORY_DATA_NAME, dir_id),
|
||||
0, nullptr, 0, KEY_ALL_ACCESS, nullptr, &key,
|
||||
nullptr) != ERROR_SUCCESS) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user