X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=lib%2FBackupPC%2FStorage%2FText.pm;h=0f22932c25da213467798c04a269cdd1f1654438;hp=09140fede34abcd9fe97d6e0914c43e4977a3b50;hb=ca593f66fd6c35764bd8997c6338b781330f019c;hpb=3d15da9b2c6de8018c02677549678d6d769234b5 diff --git a/lib/BackupPC/Storage/Text.pm b/lib/BackupPC/Storage/Text.pm index 09140fe..0f22932 100644 --- a/lib/BackupPC/Storage/Text.pm +++ b/lib/BackupPC/Storage/Text.pm @@ -12,7 +12,7 @@ # Craig Barratt # # COPYRIGHT -# Copyright (C) 2004-2007 Craig Barratt +# Copyright (C) 2004-2009 Craig Barratt # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -30,7 +30,7 @@ # #======================================================================== # -# Version 3.2.0, released 31 Dec 2008. +# Version 3.2.0beta0, released 5 April 2009. # # See http://backuppc.sourceforge.net. # @@ -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; } #