| 201 | } |
| 202 | |
| 203 | bool MountPointManager::get_path(const WCHAR *mountpoint, wstring& path) const |
| 204 | { |
| 205 | wstring mpstr; |
| 206 | if (!find(mountpoint, mpstr)) { |
| 207 | return false; |
| 208 | } |
| 209 | auto it = m_tdatas.find(mpstr); |
| 210 | if (it == m_tdatas.end()) { |
| 211 | return false; |
| 212 | } |
| 213 | |
| 214 | path = it->second->con.GetConfig()->m_basedir; |
| 215 | |
| 216 | // get rid of leading \\?\ for display |
| 217 | if (!wcsncmp(path.c_str(), L"\\\\?\\", wcslen(L"\\\\?\\"))) { |
| 218 | path = path.c_str() + wcslen(L"\\\\?\\"); |
| 219 | } |
| 220 | return true; |
| 221 | } |
| 222 | |
| 223 | void MountPointManager::get_mount_points(vector<wstring>& mps, function<bool(const wchar_t *)> filter) const |
| 224 | { |
no test coverage detected