| Summary: | Add support for Cygwin in getPathString() | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Jon Beniston <jon> | ||||
| Component: | Autotools | Assignee: | Jeff Johnston <jjohnstn> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | ||||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Jon Beniston
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.
|