| 102 | } |
| 103 | |
| 104 | void InotifyTree::removeDirectory(int wd) { |
| 105 | auto nodeIterator = mInotifyNodeByWatchDescriptor->find(wd); |
| 106 | if (nodeIterator == mInotifyNodeByWatchDescriptor->end()) { |
| 107 | return; |
| 108 | } |
| 109 | |
| 110 | InotifyNode *node = nodeIterator->second; |
| 111 | InotifyNode *parent = node->getParent(); |
| 112 | if (parent == NULL) { |
| 113 | delete mRoot; |
| 114 | mRoot = NULL; |
| 115 | setError("Service shutdown: root path changed (renamed or deleted)"); |
| 116 | return; |
| 117 | } |
| 118 | |
| 119 | parent->removeChild(node->getName()); |
| 120 | } |
| 121 | |
| 122 | void InotifyTree::removeNodeReferenceByWD(int wd) { |
| 123 | auto nodeIterator = mInotifyNodeByWatchDescriptor->find(wd); |
no test coverage detected