Apply patch from black penguin to fix perl errors in translation-status
Andrew Lewman

Andrew Lewman commited on 2009-06-10 03:57:52
Zeige 1 geänderte Dateien mit 6 Einfügungen und 1 Löschungen.

... ...
@@ -24,8 +24,13 @@ sub do_status(\%$$) {
24 24
 
25 25
 	my @warnings;
26 26
 	for my $lang (@LANGUAGES) {
27
-		opendir(DIR, "$dir/$lang") or
27
+		my $dir_opened = opendir(DIR, "$dir/$lang");
28
+
29
+		if (! $dir_opened) {
28 30
 			$may_miss_dir or die ("Cannot opendir $dir/$lang: $!\n");
31
+			next;
32
+		}
33
+
29 34
 		my @files = grep { $_ ne '.' && $_ ne '..' &&
30 35
 			$_ !~ /tor-manual/i && $_ !~ /translation-status/i && $_ =~ m/^[^.]/ && -f "$dir/$lang/$_"} readdir(DIR);
31 36
 		closedir DIR;
32 37