MCPcopy Create free account
hub / github.com/amule-project/amule / NotifyPathRemoved

Method NotifyPathRemoved

src/SharedFileList.cpp:716–738  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

714
715
716void 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
741void CSharedFileList::NotifyPathModified(const wxString& fullPath)

Callers 1

FlushPendingEventsMethod · 0.80

Calls 3

CFormatClass · 0.85
IsEmptyMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected