* lots of minor changes to prepare for 3.0.0beta0 release
[BackupPC.git] / bin / BackupPC_trashClean
index cabeffb..e74792f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/perl -T
+#!/bin/perl
 #============================================================= -*-perl-*-
 #
 # BackupPC_trashClean: remove all the files in $TopDir/trash.
@@ -11,7 +11,7 @@
 #   Craig Barratt  <cbarratt@users.sourceforge.net>
 #
 # COPYRIGHT
-#   Copyright (C) 2001  Craig Barratt
+#   Copyright (C) 2001-2003  Craig Barratt
 #
 #   This program is free software; you can redistribute it and/or modify
 #   it under the terms of the GNU General Public License as published by
 #
 #========================================================================
 #
-# Version 2.0.0_CVS, released 18 Jan 2003.
+# Version 3.0.0beta0, released 11 Jul 2006.
 #
 # See http://backuppc.sourceforge.net.
 #
 #========================================================================
 
 use strict;
+no  utf8;
 use lib "/usr/local/BackupPC/lib";
 use BackupPC::Lib;
 
@@ -51,7 +52,9 @@ $bpc->ChildInit();
 ###########################################################################
 while ( 1 ) {
     print("processState running\n");
-    1 while ( $bpc->RmTreeTrashEmpty("$TopDir/trash") );
+    if ( $bpc->RmTreeTrashEmpty("$TopDir/trash") < 0 ) {
+       print("log BackupPC_trashClean failed to empty $TopDir/trash\n");
+    }
     print("processState idle\n");
     sleep($Conf{TrashCleanSleepSec} || 300);
 }