Index: dart/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/dartium/BreakpointManager.java |
=================================================================== |
--- dart/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/dartium/BreakpointManager.java (revision 31645) |
+++ dart/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/dartium/BreakpointManager.java (working copy) |
@@ -189,7 +189,10 @@ |
} else { |
i = 1; |
} |
- String filePath = new Path(regex).removeLastSegments(path.segmentCount() - (i + 1)).toString(); |
+ String filePath = regex; |
+ if (path.segmentCount() > i + 1) { |
+ filePath = new Path(regex).removeLastSegments(path.segmentCount() - (i + 1)).toString(); |
+ } |
String packagePath = resolvePathToPackage(resource, filePath); |
if (packagePath != null) { |