| 442 | } |
| 443 | |
| 444 | bool CaseCache::purge(LPCWSTR path) |
| 445 | { |
| 446 | bool bRet = true; |
| 447 | |
| 448 | wstring ucpath; |
| 449 | |
| 450 | if (!touppercase(path, ucpath)) |
| 451 | return false; |
| 452 | |
| 453 | lock(); |
| 454 | |
| 455 | try { |
| 456 | |
| 457 | auto it = m_map.find(ucpath); |
| 458 | |
| 459 | if (it == m_map.end()) { |
| 460 | bRet = false; |
| 461 | } else { |
| 462 | remove_node(it); |
| 463 | } |
| 464 | } catch (...) { |
| 465 | bRet = false; |
| 466 | } |
| 467 | |
| 468 | unlock(); |
| 469 | |
| 470 | return bRet; |
| 471 | } |
| 472 | |
| 473 | // use our own callback so rest of the code doesn't need to know about Dokany internals |
| 474 | static int WINAPI casecache_fill_find_data(PWIN32_FIND_DATAW fdata, PWIN32_FIND_DATAW fdata_orig, void * dokan_cb, void * dokan_ctx) |
no test coverage detected