diff options
| author | Martin Ritchie <ritchiem@apache.org> | 2009-03-09 09:40:13 +0000 |
|---|---|---|
| committer | Martin Ritchie <ritchiem@apache.org> | 2009-03-09 09:40:13 +0000 |
| commit | 043bd565f3517cd06c1742c6de90ffef30e8bec4 (patch) | |
| tree | 1c15781aff7d54ef349840110f2efc7c13a9529a /java/common/src/main | |
| parent | bab8070ad7989386b11f4106d9f15e73d9246c1d (diff) | |
| download | qpid-python-043bd565f3517cd06c1742c6de90ffef30e8bec4.tar.gz | |
FileUtils would report a failure to delete a non-existent file
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@751636 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/common/src/main')
| -rw-r--r-- | java/common/src/main/java/org/apache/qpid/util/FileUtils.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/java/common/src/main/java/org/apache/qpid/util/FileUtils.java b/java/common/src/main/java/org/apache/qpid/util/FileUtils.java index 585657c8bb..029e298c32 100644 --- a/java/common/src/main/java/org/apache/qpid/util/FileUtils.java +++ b/java/common/src/main/java/org/apache/qpid/util/FileUtils.java @@ -247,7 +247,7 @@ public class FileUtils boolean success = true; // If we have nothing to delete then it must be ok to say it was deleted. - if (file == null) + if (file == null || !file.exists()) { return true; } @@ -258,7 +258,7 @@ public class FileUtils { for (File subFile : file.listFiles()) { - success = delete(subFile, true) & success ; + success = delete(subFile, true) && success; } return success && file.delete(); |
