-#!/bin/perl -T
+#!/bin/perl
#============================================================= -*-perl-*-
#
# BackupPC_trashClean: remove all the files in $TopDir/trash.
# 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 1.6.0_CVS, released 10 Dec 2002.
+# 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;
###########################################################################
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);
}