X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=bin%2FBackupPC_trashClean;h=e1377856537996bae017d1b0243f0d9380a04798;hp=1c78b1c4fdeef2440521f94bba67c916f8dfd0b8;hb=d29fc837cef51c57811cd0805853a36dac9ea468;hpb=9175f9157f0d54b50ebf11d2036c20f50ffc6d9d diff --git a/bin/BackupPC_trashClean b/bin/BackupPC_trashClean index 1c78b1c..e137785 100755 --- a/bin/BackupPC_trashClean +++ b/bin/BackupPC_trashClean @@ -1,4 +1,4 @@ -#!/bin/perl -T +#!/bin/perl #============================================================= -*-perl-*- # # BackupPC_trashClean: remove all the files in $TopDir/trash. @@ -29,14 +29,15 @@ # #======================================================================== # -# Version 2.0.0_CVS, released 3 Feb 2003. +# Version 2.0.2, released 6 Oct 2003. # # See http://backuppc.sourceforge.net. # #======================================================================== use strict; -use lib "/usr/local/BackupPC/lib"; +no utf8; +use lib "/usr/local/BackupPC2.0.2/lib"; use BackupPC::Lib; die("BackupPC::Lib->new failed\n") if ( !(my $bpc = BackupPC::Lib->new) ); @@ -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); }