| 2372 | } |
| 2373 | |
| 2374 | BOOL unmount_crypt_fs(const WCHAR* mountpoint, bool wait, wstring& mes) { |
| 2375 | |
| 2376 | |
| 2377 | wstring mpstr; |
| 2378 | if (!MountPointManager::getInstance().find(mountpoint, mpstr)) { |
| 2379 | mes += LocUtils::GetStringFromResources(IDS_UNABLE_FIND_MPOINT); |
| 2380 | return FALSE; |
| 2381 | } |
| 2382 | if (!DokanRemoveMountPoint(mpstr.c_str())) { |
| 2383 | mes += GetWindowsErrorString(GetLastError()); |
| 2384 | return FALSE; |
| 2385 | } |
| 2386 | |
| 2387 | if (wait) { |
| 2388 | bool res = MountPointManager::getInstance().wait_and_destroy(mpstr.c_str()); |
| 2389 | if (!res) { |
| 2390 | CString strMsg; |
| 2391 | strMsg.Format(LocUtils::GetStringFromResources(IDS_WAIT_UNMOUNT_ERROR).c_str(), GetWindowsErrorString(GetLastError())); |
| 2392 | mes += strMsg; |
| 2393 | } |
| 2394 | return res; |
| 2395 | } else { |
| 2396 | return TRUE; |
| 2397 | } |
| 2398 | |
| 2399 | } |
| 2400 | |
| 2401 | bool unmount_all(bool wait) |
| 2402 | { |
no test coverage detected