Community
Participate
Working Groups
Build Identifier: M20090917-0800 getPathString() currently only handles Ming paths. The attached patch adds support for Cygwin. Reproducible: Always
Created attachment 170123 [details] Add support for cygwin paths
Today is the last day we can accept patches for Helios. Jeff, please look at this today. Thanks.
Patch modified and applied. The launcher method chosen is deprecated. As well, it makes sense to stash the value for repeated calls so a private String variable was created. The following is the modified version. The variable winOSType is a private variable initialized to "". // Method to get the Win OS Type to distinguish between Cygwin and MingW private String getWinOSType() { if (winOSType.equals("")) { try { CommandLauncher launcher = new CommandLauncher(); ByteArrayOutputStream out = new ByteArrayOutputStream(); launcher.execute( new Path(SHELL_COMMAND), //$NON-NLS-1$ new String[] { "-c", "echo $OSTYPE" }, //$NON-NLS-1$ //$NON-NLS-2$ new String[0], new Path("."), //$NON-NLS-1$ new NullProgressMonitor()); if (launcher.waitAndRead(out, out) == CommandLauncher.OK) winOSType = out.toString().trim(); } catch (CoreException e) { // do nothing } } return winOSType; }
Comment on attachment 170123 [details] Add support for cygwin paths Setting iplog flag.