[vhffs-dev] [1457] Some crazy people still use etch, so let's keep pre perl 5. 9 compatibility (fix an use of undefined value under 5.8)

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1457
Author:   beuss
Date:     2009-06-19 22:38:56 +0200 (Fri, 19 Jun 2009)

Log Message:
-----------
Some crazy people still use etch, so let's keep pre perl 5.9 compatibility (fix an use of undefined value under 5.8)

Modified Paths:
--------------
    trunk/vhffs-robots/src/mail_delete.pl


Modified: trunk/vhffs-robots/src/mail_delete.pl
===================================================================
--- trunk/vhffs-robots/src/mail_delete.pl	2009-06-18 12:02:37 UTC (rev 1456)
+++ trunk/vhffs-robots/src/mail_delete.pl	2009-06-19 20:38:56 UTC (rev 1457)
@@ -73,7 +73,9 @@
 	next if(@$lists);
 
 	Vhffs::Robots::vhffs_log( sprintf( "Delete mail domain %s" , $mail->get_domain ) , $vhffs);
-	if( $mail->get_dir && -d -r -w -x $mail->get_dir )  {
+	my $dir = $mail->get_dir();
+
+	if( defined($dir) && -d $dir && -r _ && -w _ && -x _ )  {
 		my $dir = $mail->get_dir;
 		File::Path::rmtree( $mail->get_dir, { error => \my $errors });
 		# Mail domain directories are hashed on two levels, so we've 3 potentially


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/