瀏覽代碼

Merge topic 'cmFileMonitor-skip-empty-names'

7bad99b0 cmake-server: Do not try watching subdirectories with empty names
Brad King 8 年之前
父節點
當前提交
c9a0b14153
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      Source/cmFileMonitor.cxx

+ 3 - 0
Source/cmFileMonitor.cxx

@@ -334,6 +334,9 @@ void cmFileMonitor::MonitorPaths(const std::vector<std::string>& paths,
           rootSegment)); // Can not be both filename and root part of the path!
 
       const std::string& currentSegment = pathSegments[i];
+      if (currentSegment.empty()) {
+        continue;
+      }
 
       cmIBaseWatcher* nextWatcher = currentWatcher->Find(currentSegment);
       if (!nextWatcher) {