ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hol...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers DefaultCompilerAdapter.java
Date Mon, 08 Apr 2002 06:46:43 GMT
holtdl      02/04/07 23:46:43

  Modified:    src/main/org/apache/tools/ant/taskdefs/compilers
                        DefaultCompilerAdapter.java
  Log:
  Create temp file in user.dir (PR 4590).
  
  Revision  Changes    Path
  1.21      +4 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
  
  Index: DefaultCompilerAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- DefaultCompilerAdapter.java	14 Feb 2002 17:34:19 -0000	1.20
  +++ DefaultCompilerAdapter.java	8 Apr 2002 06:46:43 -0000	1.21
  @@ -401,7 +401,9 @@
               if (Commandline.toString(args).length() > 4096) {
                   PrintWriter out = null;
                   try {
  -                    tmpFile = fileUtils.createTempFile("jikes", "", null);
  +                    String userDirName = System.getProperty("user.dir");
  +                    File userDir = new File(userDirName);
  +                    tmpFile = fileUtils.createTempFile("jikes", "", userDir);
                       out = new PrintWriter(new FileWriter(tmpFile));
                       for (int i = firstFileName; i < args.length; i++) {
                           out.println(args[i]);
  @@ -409,7 +411,7 @@
                       out.flush();
                       commandArray = new String[firstFileName+1];
                       System.arraycopy(args, 0, commandArray, 0, firstFileName);
  -                    commandArray[firstFileName] = "@" + tmpFile.getAbsolutePath();
  +                    commandArray[firstFileName] = "@" + tmpFile;
                   } catch (IOException e) {
                       throw new BuildException("Error creating temporary file", e, location);
                   } finally {
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message