X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=bin%2FBackupPC_trashClean;h=df733e6bf7d2d3ebc84ed2dba0bdd4efcc248d18;hp=1c78b1c4fdeef2440521f94bba67c916f8dfd0b8;hb=5b3e6091d542c2e7445d5dd511cdf6e20aec8b8d;hpb=9175f9157f0d54b50ebf11d2036c20f50ffc6d9d diff --git a/bin/BackupPC_trashClean b/bin/BackupPC_trashClean index 1c78b1c..df733e6 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. @@ -11,7 +11,7 @@ # Craig Barratt # # 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 @@ -29,13 +29,14 @@ # #======================================================================== # -# Version 2.0.0_CVS, released 3 Feb 2003. +# Version 3.0.0alpha, released 23 Jan 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); }