| 714 | |
| 715 | |
| 716 | void CSharedFileList::NotifyPathRemoved(const wxString& fullPath) |
| 717 | { |
| 718 | if (fullPath.IsEmpty()) { |
| 719 | return; |
| 720 | } |
| 721 | |
| 722 | // RemoveFile re-acquires list_mut itself, so we hold list_mut |
| 723 | // only long enough to resolve the path → CKnownFile* lookup and |
| 724 | // then drop it before calling RemoveFile. |
| 725 | CKnownFile* file = NULL; |
| 726 | { |
| 727 | wxMutexLocker lock(list_mut); |
| 728 | auto it = m_pathIndex.find(fullPath); |
| 729 | if (it == m_pathIndex.end()) { |
| 730 | return; |
| 731 | } |
| 732 | file = it->second; |
| 733 | } |
| 734 | |
| 735 | AddDebugLogLineN(logKnownFiles, |
| 736 | CFormat("Watcher: detaching deleted file '%s' from shares") % fullPath); |
| 737 | RemoveFile(file); |
| 738 | } |
| 739 | |
| 740 | |
| 741 | void CSharedFileList::NotifyPathModified(const wxString& fullPath) |
no test coverage detected