1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +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()));
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;
}