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:
parent
1ee7bff8d5
commit
082b4787c3
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Reference in a new issue