X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=bin%2FBackupPC_link;h=7d667849b8ea86cf607625e0b68eac3c69d94051;hp=32bab7f9e914c16a992f24bfdb6aed1838f32f3b;hb=06017d5181d9c62f8cbd1c6d58d831f54d7d4ad1;hpb=9cf3998c4ef71332dea96ff3115daf8b9f722acb diff --git a/bin/BackupPC_link b/bin/BackupPC_link index 32bab7f..7d66784 100755 --- a/bin/BackupPC_link +++ b/bin/BackupPC_link @@ -39,7 +39,7 @@ # #======================================================================== # -# Version 3.2.0beta0, released 5 April 2009. +# Version 3.2.0, released 31 Jul 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}")