skip directories in all_conf
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 9 Oct 2010 12:28:01 +0000 (12:28 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 9 Oct 2010 12:28:01 +0000 (12:28 +0000)
lib/PXElator/client.pm

index 7fc943d..89c3498 100644 (file)
@@ -81,6 +81,7 @@ sub all_conf {
        foreach my $file ( glob("$path/*"), glob("$path/*/*") ) {
                my $name = $file;
                $name =~ s{^$path/+}{} || die "can't remove $path from $name";
+               next if -d $file;
                $conf->{ $name } =
                        -l $file ? readlink  $file :
                        -f $file ? read_file $file :