Browse Source

Very quick fix for bug 16611

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274011 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 22 years ago
parent
commit
f3ddbffe3c
1 changed files with 12 additions and 1 deletions
  1. +12
    -1
      src/main/org/apache/tools/ant/taskdefs/condition/Os.java

+ 12
- 1
src/main/org/apache/tools/ant/taskdefs/condition/Os.java View File

@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2001-2002 The Apache Software Foundation. All rights
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -219,8 +219,19 @@ public class Os implements Condition {
&& (!isFamily("mac") || osName.endsWith("x"));
} else if (family.equals("win9x")) {
isFamily = isFamily("windows") &&
/*
* FIXME
*
* Need a better way to know which one runs CMD.EXE
* and wich COMMAND.COM.
*
* If we use a fixed list of names, we should rather
* use one for all win9x flavors as it is supposed to
* be a final list.
*/
!(osName.indexOf("nt") >= 0 ||
osName.indexOf("2000") >= 0 ||
osName.indexOf("2003") >= 0 ||
osName.indexOf("xp") >= 0);
} else if (family.equals("z/os")) {
isFamily = osName.indexOf("z/os") > -1


Loading…
Cancel
Save