A patch to fix the OS check for Windows. It was looking for "nt" which
only worked for Windows NT (not Windows 2000).




Index: P4Base.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java,v
retrieving revision 1.1
diff -u -r1.1 P4Base.java
--- P4Base.java 2000/11/28 16:46:43     1.1
+++ P4Base.java 2000/12/05 15:45:19
@@ -112,7 +112,7 @@
         String myOS = System.getProperty("os.name");
         if(myOS == null) throw new BuildException("Unable to determine OS");
         
-        if(myOS.toLowerCase().indexOf("nt") >= 0) {
+        if( myOS.startsWith( "Windows" ) ) {
             shell = "cmd /c ";
         } else {
             shell = "/bin/sh "; //This needs testing on Unix!!!!

Reply via email to