From d291cececde455a3b6a8c2d2cd8e87bd6ccf567b Mon Sep 17 00:00:00 2001
From: ribeaudc <ribeaudc>
Date: Thu, 3 Jul 2008 11:03:09 +0000
Subject: [PATCH] add: - Warning if file could not be deleted.

SVN: 7022
---
 .../cisd/common/utilities/TriggeringTimerTask.java        | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/common/source/java/ch/systemsx/cisd/common/utilities/TriggeringTimerTask.java b/common/source/java/ch/systemsx/cisd/common/utilities/TriggeringTimerTask.java
index 61ef393e549..068c1dd7066 100644
--- a/common/source/java/ch/systemsx/cisd/common/utilities/TriggeringTimerTask.java
+++ b/common/source/java/ch/systemsx/cisd/common/utilities/TriggeringTimerTask.java
@@ -107,7 +107,12 @@ public class TriggeringTimerTask extends TimerTask
                 if (triggerFile.exists())
                 {
                     trigger();
-                    triggerFile.delete();
+                    if (triggerFile.delete() == false)
+                    {
+                        operationLog.warn(String.format(
+                                "Was not able to delete trigger file '%s'.", triggerFile
+                                        .getAbsolutePath()));
+                    }
                 }
             } catch (final Exception ex)
             {
@@ -115,5 +120,4 @@ public class TriggeringTimerTask extends TimerTask
             }
         }
     }
-
 }
-- 
GitLab