summaryrefslogtreecommitdiffstats
path: root/base/java-tools
diff options
context:
space:
mode:
authorAbhishek Koneru <akoneru@redhat.com>2012-07-09 15:12:11 -0400
committerAde Lee <alee@redhat.com>2012-07-12 16:42:18 -0400
commit15ac6d2b8e83a73ac1f62ab0da0d6a85717f28fd (patch)
treef3bd2a816e816ad565f13ce90816a7fd7fb32454 /base/java-tools
parent9e4e40b80de0ba47702392b9ad6ccecf67496db7 (diff)
downloadpki-15ac6d2b8e83a73ac1f62ab0da0d6a85717f28fd.tar.gz
pki-15ac6d2b8e83a73ac1f62ab0da0d6a85717f28fd.tar.xz
pki-15ac6d2b8e83a73ac1f62ab0da0d6a85717f28fd.zip
NO_HASHCODE_OVERRIDDEN
Diffstat (limited to 'base/java-tools')
-rw-r--r--base/java-tools/src/com/netscape/cmstools/PasswordCache.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/base/java-tools/src/com/netscape/cmstools/PasswordCache.java b/base/java-tools/src/com/netscape/cmstools/PasswordCache.java
index 89254a2a5..d97a21706 100644
--- a/base/java-tools/src/com/netscape/cmstools/PasswordCache.java
+++ b/base/java-tools/src/com/netscape/cmstools/PasswordCache.java
@@ -609,7 +609,9 @@ class PWsdrCache {
if (tmpPWcache.exists()) {
// it wasn't removed?
- tmpPWcache.delete();
+ if (!tmpPWcache.delete()) {
+ debug("Could not delete the existing " + mPWcachedb + ".tmp file.");
+ }
}
outstream = new FileOutputStream(mPWcachedb + ".tmp");
@@ -626,7 +628,9 @@ class PWsdrCache {
try {
// Always remove any pre-existing target file
if (origFile.exists()) {
- origFile.delete();
+ if (!origFile.delete()) {
+ debug("Could not delete the existing " + mPWcachedb + "file.");
+ }
}
if (isNT()) {
@@ -644,7 +648,9 @@ class PWsdrCache {
// Remove the temporary file if and only if
// the "rename" was successful.
if (origFile.exists()) {
- tmpPWcache.delete();
+ if (!tmpPWcache.delete()) {
+ debug("Could not delete the existing " + mPWcachedb + ".tmp file.");
+ }
// Make certain that the final file has
// the correct permissions.