Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gvozdev2011-08-18 12:14:13 -0400
committerAndrew Gvozdev2011-08-18 13:41:01 -0400
commitd5d717128b47835cfbb5a4623d977bfbb2edd925 (patch)
treee181eec4ab4f88351617ec961885df1960c767a4 /build/org.eclipse.cdt.make.core
parent950f133f77d2f390e9a069015aa4c64e776a9d03 (diff)
downloadorg.eclipse.cdt-d5d717128b47835cfbb5a4623d977bfbb2edd925.tar.gz
org.eclipse.cdt-d5d717128b47835cfbb5a4623d977bfbb2edd925.tar.xz
org.eclipse.cdt-d5d717128b47835cfbb5a4623d977bfbb2edd925.zip
bug 345750: tidy up cosmetics
Diffstat (limited to 'build/org.eclipse.cdt.make.core')
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParserUtility.java20
1 files changed, 7 insertions, 13 deletions
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParserUtility.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParserUtility.java
index 2c331364da..f206343852 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParserUtility.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParserUtility.java
@@ -224,26 +224,16 @@ public class GCCPerFileBOPConsoleParserUtility extends AbstractGCCBOPConsolePars
* @return filePath : IPath - not <code>null</code>
*/
public IPath getAbsolutePath(String filePath) {
- IPath p = getAbsolutePath2(filePath);
- if (p.getDevice()==null) {
- p = p.setDevice(getWorkingDirectory().getDevice());
- }
- return p;
- }
-
- private IPath getAbsolutePath2(String filePath) {
IPath pFilePath;
if (filePath.startsWith("/")) { //$NON-NLS-1$
- return convertCygpath(new Path(filePath));
- }
- else if (filePath.startsWith("\\") || //$NON-NLS-1$
+ pFilePath = convertCygpath(new Path(filePath));
+ } else if (filePath.startsWith("\\") || //$NON-NLS-1$
(!filePath.startsWith(".") && //$NON-NLS-1$
filePath.length() > 2 && filePath.charAt(1) == ':' &&
(filePath.charAt(2) == '\\' || filePath.charAt(2) == '/'))) {
// absolute path
pFilePath = new Path(filePath);
- }
- else {
+ } else {
// relative path
IPath cwd = getWorkingDirectory();
if (!cwd.isAbsolute()) {
@@ -259,6 +249,10 @@ public class GCCPerFileBOPConsoleParserUtility extends AbstractGCCBOPConsolePars
}
pFilePath = cwd.append(filePath);
}
+
+ if (pFilePath.getDevice()==null) {
+ pFilePath = pFilePath.setDevice(getWorkingDirectory().getDevice());
+ }
return pFilePath;
}

Back to the top