1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 18:26:01 +02:00

Bug 245692 - CygpathTranslator default conversion fails

Patch by Hans-Erik Floryd
This commit is contained in:
Anton Leherbauer 2008-09-24 10:46:18 +00:00
parent cae0db4052
commit 3eef8dc96a

View file

@ -8,6 +8,7 @@
* Contributors: * Contributors:
* IBM - Initial API and implementation * IBM - Initial API and implementation
* Anton Leherbauer (Wind River Systems) * Anton Leherbauer (Wind River Systems)
* Hans-Erik Floryd (hef-cdt@rt-labs.com) - http://bugs.eclipse.org/245692
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.make.internal.core.scannerconfig.util; package org.eclipse.cdt.make.internal.core.scannerconfig.util;
@ -126,7 +127,7 @@ public class CygpathTranslator {
if ("cygdrive".equals(realPath.segment(0))) { //$NON-NLS-1$ if ("cygdrive".equals(realPath.segment(0))) { //$NON-NLS-1$
String drive= realPath.segment(1); String drive= realPath.segment(1);
if (drive.length() == 1) { if (drive.length() == 1) {
translatedPath= realPath.removeFirstSegments(2).setDevice(drive.toUpperCase() + ':').toOSString(); translatedPath= realPath.removeFirstSegments(2).makeAbsolute().setDevice(drive.toUpperCase() + ':').toOSString();
} }
} }
} }