Read while file in at once, to handle includes
authorJamie Cameron <jcameron@webmin.com>
Mon, 5 Nov 2007 20:22:12 +0000 (20:22 +0000)
committerJamie Cameron <jcameron@webmin.com>
Mon, 5 Nov 2007 20:22:12 +0000 (20:22 +0000)
bacula-backup/bacula-backup-lib.pl

index 600c80a..89deb5c 100644 (file)
@@ -66,7 +66,9 @@ if (!defined($config_file_cache{$file})) {
        local $parent = { 'members' => \@rv };
        local $lnum = 0;
        open(CONF, $_[0]) || return undef;
-       while(<CONF>) {
+       local @lines = <CONF>;
+       close(CONF);
+       foreach (@lines) {
                s/\r|\n//g;
                s/#.*$//;
                if (/^\s*\@(.*\S)/) {