1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

298615: Fix detection of space as separator in cygpath.

This commit is contained in:
Markus Schorn 2010-02-10 07:51:20 +00:00
parent 01cef9b0e9
commit a4fe48870e

View file

@ -41,18 +41,15 @@ public class CygPath {
stdin = new BufferedWriter(new OutputStreamWriter(cygpath.getOutputStream())); stdin = new BufferedWriter(new OutputStreamWriter(cygpath.getOutputStream()));
stdout = new BufferedReader(new InputStreamReader(cygpath.getInputStream())); stdout = new BufferedReader(new InputStreamReader(cygpath.getInputStream()));
try { try {
getFileName("test"); //$NON-NLS-1$ // test for older cygpath String test= getFileName("a b"); //$NON-NLS-1$
if ("a".equals(test)) { //$NON-NLS-1$
// Bug 298615: Test for versions that tread space as a separator // Bug 298615: This version seems to treat space as a separator
getFileName("a b"); //$NON-NLS-1$
if (stdout.ready()) {
fSpaceIsSeparator= true; fSpaceIsSeparator= true;
// Read off everything // Read off second part
while(stdout.ready()) { stdout.readLine();
stdout.read();
}
} }
} catch (IOException e) { } catch (IOException e) {
// older cygwin
dispose(); dispose();
useOldCygPath = true; useOldCygPath = true;
} }