X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=lib%2FBackupPC%2FStorage%2FText.pm;h=0f22932c25da213467798c04a269cdd1f1654438;hp=d9be3c3aa36aff5e16238f3d0260833ad580c60e;hb=ca593f66fd6c35764bd8997c6338b781330f019c;hpb=9cf3998c4ef71332dea96ff3115daf8b9f722acb diff --git a/lib/BackupPC/Storage/Text.pm b/lib/BackupPC/Storage/Text.pm index d9be3c3..0f22932 100644 --- a/lib/BackupPC/Storage/Text.pm +++ b/lib/BackupPC/Storage/Text.pm @@ -274,25 +274,25 @@ sub ConfigPath sub ConfigDataRead { - my($s, $host) = @_; + my($s, $host, $prevConfig) = @_; my($ret, $mesg, $config, @configs); # # TODO: add lock # - my $conf = {}; + my $conf = $prevConfig || {}; my $configPath = $s->ConfigPath($host); push(@configs, $configPath) if ( -f $configPath ); foreach $config ( @configs ) { - %Conf = (); + %Conf = %$conf; if ( !defined($ret = do $config) && ($! || $@) ) { $mesg = "Couldn't open $config: $!" if ( $! ); $mesg = "Couldn't execute $config: $@" if ( $@ ); $mesg =~ s/[\n\r]+//; return ($mesg, $conf); } - %$conf = ( %$conf, %Conf ); + %$conf = %Conf; } #