X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=bin%2FBackupPC_link;h=8c75cde186e1791229d4964246b5cea1553db18a;hp=b8f74819a7aab28b551666e1512e78017251b3bd;hb=5c6a6cc4f333ce44a9df62ab828b0b9341579f7c;hpb=e9453b7611be63303572ae443d5fb56b73364678 diff --git a/bin/BackupPC_link b/bin/BackupPC_link index b8f7481..8c75cde 100755 --- a/bin/BackupPC_link +++ b/bin/BackupPC_link @@ -1,4 +1,4 @@ -#!/bin/perl -T +#!/bin/perl #============================================================= -*-perl-*- # # BackupPC_link: link new backup into pool @@ -21,7 +21,7 @@ # Craig Barratt # # COPYRIGHT -# Copyright (C) 2001 Craig Barratt +# Copyright (C) 2001-2003 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,13 +39,14 @@ # #======================================================================== # -# Version 1.6.0_CVS, released 10 Dec 2002. +# Version 2.1.0beta1, released 9 Apr 2004. # # See http://backuppc.sourceforge.net. # #======================================================================== use strict; +no utf8; use lib "/usr/local/BackupPC/lib"; use BackupPC::Lib; use BackupPC::Attrib; @@ -70,7 +71,7 @@ if ( @ARGV != 1 ) { print("usage: $0 \n"); exit(1); } -if ( $ARGV[0] !~ /^([\w\.-]+)$/ ) { +if ( $ARGV[0] !~ /^([\w\.\s-]+)$/ ) { print("$0: bad host name '$ARGV[0]'\n"); exit(1); } @@ -105,7 +106,8 @@ while ( 1 ) { # $CurrDumpDir = "$Dir/$Backups[$num]{num}"; $Compress = $Backups[$num]{compress}; - if ( open(NEW, "$Dir/NewFileList.$Backups[$num]{num}") ) { + if ( open(NEW, "<", "$Dir/NewFileList.$Backups[$num]{num}") ) { + binmode(NEW); while ( ) { chomp; next if ( !/(\w+) (\d+) (.*)/ ); @@ -126,7 +128,7 @@ while ( 1 ) { # my $noFill = 1; my $fillFromNum; - if ( $Backups[$num]{type} eq "full" ) { + if ( $Backups[$num]{type} ne "incr" ) { $noFill = 0 } elsif ( $Conf{IncrFill} ) { my $i;