Module: tools Branch: master Commit: fe3b6ec5e296af486340bac3f9a52c39833fbf2c URL: http://source.winehq.org/git/tools.git/?a=commit;h=fe3b6ec5e296af486340bac3f... Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Thu Mar 7 18:32:54 2013 +0100 patches: Fail cleanly when expire cannot open the patches directories. --- patches/expire | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/expire b/patches/expire index c4d49f3..05aee19 100755 --- a/patches/expire +++ b/patches/expire @@ -100,7 +100,7 @@ sub get_patch_state($) # expire current patches -opendir DIR, $dir; +opendir DIR, $dir or die "cannot open '$dir': $!\n"; foreach my $file (sort readdir DIR) { next unless $file =~ /^[0-9]+$/; @@ -140,7 +140,7 @@ closedir DIR; # expire old patches whose status has changed -opendir DIR, "$dir/OLD"; +opendir DIR, "$dir/OLD" or die "cannot open '$dir/OLD': $!\n"; foreach my $file (sort readdir DIR) { next unless $file =~ /^[0-9]+$/;