Browse Source

The gcj compiler adapter failed if the destdir didn't exist.

PR: 25856


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275986 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 21 years ago
parent
commit
ded399dd7b
2 changed files with 6 additions and 3 deletions
  1. +3
    -0
      WHATSNEW
  2. +3
    -3
      src/main/org/apache/tools/ant/taskdefs/compilers/Gcj.java

+ 3
- 0
WHATSNEW View File

@@ -28,6 +28,9 @@ Fixed bugs:

* <java> ignored the append attribute, Bugzilla Report 26137.

* The gcj compiler adapter for <javac> failed if the destination
directory didn't exist. Bugzilla Report 25856.

Other changes:
--------------
* Translate task logs a debug message specifying the number of files


+ 3
- 3
src/main/org/apache/tools/ant/taskdefs/compilers/Gcj.java View File

@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights
* Copyright (c) 2001-2004 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -119,10 +119,10 @@ public class Gcj extends DefaultCompilerAdapter {
cmd.createArgument().setValue("-d");
cmd.createArgument().setFile(destDir);

if (destDir.mkdirs()) {
if (!destDir.exists() && !destDir.mkdirs()) {
throw new BuildException("Can't make output directories. "
+ "Maybe permission is wrong. ");
};
}
}

cmd.createArgument().setValue("-classpath");


Loading…
Cancel
Save