summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortg(x) <*@tg-x.net>2011-02-13 14:33:58 (GMT)
committer tg(x) <*@tg-x.net>2013-06-05 15:58:40 (GMT)
commit128b564c80228b330a342714076718aedba601f3 (patch)
tree006134c36cb8c06776d0366aa5706b0849b52476
parentddf67d329f5f9cd8adcd6b156cac5c093f652292 (diff)
-
-rwxr-xr-xbin/gitzone15
1 files changed, 8 insertions, 7 deletions
diff --git a/bin/gitzone b/bin/gitzone
index 7b5ba78..8f35c32 100755
--- a/bin/gitzone
+++ b/bin/gitzone
@@ -75,15 +75,16 @@ sub load_zones_config {
for my $file (keys %$d) {
$d->{$file} = $default_view if $d->{$file} eq 1;
$d->{$file} = [$d->{$file}] if ref $d->{$file} ne 'ARRAY';
- next unless $file =~ m,^/, && -f $file;
-
- open FILE, '<', $file or die $!;
- while (<FILE>) {
- if (/^\s*zone\s+"([^"]+)"/) {
- $zones->{$user}->{$dir}->{$1} = $d->{$file};
+ next unless $file =~ m,^/,;
+ if (-f $file) {
+ open FILE, '<', $file or die $!;
+ while (<FILE>) {
+ if (/^\s*zone\s+"([^"]+)"/) {
+ $zones->{$user}->{$dir}->{$1} = $d->{$file};
+ }
}
+ close FILE;
}
- close FILE;
delete $d->{$file} if $key ne '-default';
}
}