Преглед на файлове

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) {