1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Bug 315244 - Can't map sources if the executable was built on a different file system

This commit is contained in:
Ken Ryall 2010-06-01 19:34:06 +00:00
parent 1ee7bff8d5
commit 082b4787c3

View file

@ -80,8 +80,11 @@ public class MapEntrySourceContainer extends AbstractSourceContainer {
} }
// also check for device or UNC // also check for device or UNC
int firstSep = path.indexOf("/"); //$NON-NLS-1$
int idx = path.indexOf(":"); //$NON-NLS-1$ int idx = path.indexOf(":"); //$NON-NLS-1$
if (idx > 0) { // ':' indicates a Windows device separator if it comes before
// the first segment separator
if (idx > 0 && (firstSep < 0 || idx < firstSep)) {
String device = path.substring(0, idx + 1); String device = path.substring(0, idx + 1);
path = path.substring(idx + 1); path = path.substring(idx + 1);
return new Path(path).setDevice(device); return new Path(path).setDevice(device);