Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Schorn2010-02-10 07:56:25 +0000
committerMarkus Schorn2010-02-10 07:56:25 +0000
commitbba7d05b313107e0ce5c41a52356b8eefb5289ed (patch)
tree6e90f3bd4d4350086ab1331c7889d8f21d21339d
parenta57e0b48cfb5a5deb9e4881a3b4cc09141f211aa (diff)
downloadorg.eclipse.cdt-bba7d05b313107e0ce5c41a52356b8eefb5289ed.tar.gz
org.eclipse.cdt-bba7d05b313107e0ce5c41a52356b8eefb5289ed.tar.xz
org.eclipse.cdt-bba7d05b313107e0ce5c41a52356b8eefb5289ed.zip
298615: Fix detection of space as separator in cygpath.
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/CygPath.java15
1 files changed, 6 insertions, 9 deletions
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/CygPath.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/CygPath.java
index 5d42ca07742..bb7d3a5d09e 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/CygPath.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/CygPath.java
@@ -41,18 +41,15 @@ public class CygPath {
stdin = new BufferedWriter(new OutputStreamWriter(cygpath.getOutputStream()));
stdout = new BufferedReader(new InputStreamReader(cygpath.getInputStream()));
try {
- getFileName("test"); //$NON-NLS-1$ // test for older cygpath
-
- // Bug 298615: Test for versions that tread space as a separator
- getFileName("a b"); //$NON-NLS-1$
- if (stdout.ready()) {
+ String test= getFileName("a b"); //$NON-NLS-1$
+ if ("a".equals(test)) { //$NON-NLS-1$
+ // Bug 298615: This version seems to treat space as a separator
fSpaceIsSeparator= true;
- // Read off everything
- while(stdout.ready()) {
- stdout.read();
- }
+ // Read off second part
+ stdout.readLine();
}
} catch (IOException e) {
+ // older cygwin
dispose();
useOldCygPath = true;
}

Back to the top