X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=bin%2FBackupPC_link;h=c1a5604ed488a8dc3ae675670f6cb2702dfb2c9c;hp=63289aa2d0006e8fa44254fb3f61ddfb80c1621d;hb=ca593f66fd6c35764bd8997c6338b781330f019c;hpb=f6fbcc3682d2bc9e7dfdc26e95bd5fcdb359496d diff --git a/bin/BackupPC_link b/bin/BackupPC_link index 63289aa..c1a5604 100755 --- a/bin/BackupPC_link +++ b/bin/BackupPC_link @@ -21,7 +21,7 @@ # Craig Barratt # # COPYRIGHT -# Copyright (C) 2001-2007 Craig Barratt +# Copyright (C) 2001-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 @@ -39,7 +39,7 @@ # #======================================================================== # -# Version 3.2.0beta0, released 5 April 2009. +# Version 3.2.0beta1, released 10 Jan 2010. # # See http://backuppc.sourceforge.net. # @@ -108,12 +108,23 @@ while ( 1 ) { $CurrDumpDir = "$Dir/$Backups[$num]{num}"; $Compress = $Backups[$num]{compress}; if ( open(NEW, "<", "$Dir/NewFileList.$Backups[$num]{num}") ) { + my(@shareAttribArgs); binmode(NEW); while ( ) { chomp; next if ( !/(\w+) (\d+) (.*)/ ); - LinkNewFile($1, $2, "$CurrDumpDir/$3"); + if ( $3 eq "attrib" ) { + # + # Defer linking top-level attrib file until the end + # since it can appear multiple times when multiple shares + # are dumped. + # + @shareAttribArgs = ($1, $2, "$CurrDumpDir/$3"); + } else { + LinkNewFile($1, $2, "$CurrDumpDir/$3"); + } } + LinkNewFile(@shareAttribArgs) if ( @shareAttribArgs ); close(NEW); } unlink("$Dir/NewFileList.$Backups[$num]{num}")