summaryrefslogtreecommitdiffstats
path: root/base/java-tools/src/com/netscape/cmstools/PasswordCache.java
diff options
context:
space:
mode:
Diffstat (limited to 'base/java-tools/src/com/netscape/cmstools/PasswordCache.java')
-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.