This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git
The following commit(s) were added to refs/heads/master by this push:
new e1917795 Better test tear down
e1917795 is described below
commit e19177954f2ddaab6cb9fab9e8561d0387c4c322
Author: Gary Gregory <[email protected]>
AuthorDate: Wed Nov 1 14:42:45 2023 -0400
Better test tear down
---
src/test/java/org/apache/commons/compress/AbstractTestCase.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/java/org/apache/commons/compress/AbstractTestCase.java
b/src/test/java/org/apache/commons/compress/AbstractTestCase.java
index fb4ac969..ad653380 100644
--- a/src/test/java/org/apache/commons/compress/AbstractTestCase.java
+++ b/src/test/java/org/apache/commons/compress/AbstractTestCase.java
@@ -86,7 +86,7 @@ public abstract class AbstractTestCase {
*/
public static boolean tryHardToDelete(final File file) {
try {
- if (file != null) {
+ if (file != null && file.exists()) {
FileUtils.forceDelete(file);
}
return true;