From f60ca231a1cb76323cf65a2b8f563ce87fa225a8 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Wed, 1 Aug 2001 09:37:27 +0000 Subject: [PATCH] Don't delete generated files if sourcebase and basedir happen to be the same. PR: 2943 git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269422 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/taskdefs/Rmic.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/Rmic.java b/src/main/org/apache/tools/ant/taskdefs/Rmic.java index f82a622fa..110fc927a 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Rmic.java +++ b/src/main/org/apache/tools/ant/taskdefs/Rmic.java @@ -399,8 +399,12 @@ public class Rmic extends MatchingTask { } } - // Move the generated source file to the base directory - if (null != sourceBase) { + /* + * Move the generated source file to the base directory. If + * base directory and sourcebase are the same, the generated + * sources are already in place. + */ + if (null != sourceBase && !baseDir.equals(sourceBase)) { if (idl) { log("Cannot determine sourcefiles in idl mode, ", Project.MSG_WARN);