From 3c2ed1374f54be5918921d64304ca2c82ca06548 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Sat, 12 Sep 2015 22:21:49 +0200 Subject: [PATCH] Make really work with non-filesystem resources --- .../apache/tools/ant/taskdefs/BUnzip2.java | 4 +-- src/tests/antunit/taskdefs/bunzip2-test.xml | 26 +++++++++++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/BUnzip2.java b/src/main/org/apache/tools/ant/taskdefs/BUnzip2.java index 323b738cf..e4a7995fa 100644 --- a/src/main/org/apache/tools/ant/taskdefs/BUnzip2.java +++ b/src/main/org/apache/tools/ant/taskdefs/BUnzip2.java @@ -56,8 +56,8 @@ public class BUnzip2 extends Unpack { * Do the unbzipping. */ protected void extract() { - if (source.lastModified() > dest.lastModified()) { - log("Expanding " + source.getAbsolutePath() + " to " + if (srcResource.getLastModified() > dest.lastModified()) { + log("Expanding " + srcResource.getName() + " to " + dest.getAbsolutePath()); FileOutputStream out = null; diff --git a/src/tests/antunit/taskdefs/bunzip2-test.xml b/src/tests/antunit/taskdefs/bunzip2-test.xml index a9ca42376..fcf05d964 100644 --- a/src/tests/antunit/taskdefs/bunzip2-test.xml +++ b/src/tests/antunit/taskdefs/bunzip2-test.xml @@ -18,11 +18,33 @@ - + + + + - \ No newline at end of file + + + + + + + + + + + + + + + +