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