* Added some performance improvements to BackupPC::Xfer::RsyncFileIO
[BackupPC.git] / bin / BackupPC_tarExtract
index 1686ffd..4043bf0 100755 (executable)
@@ -27,7 +27,7 @@
 #
 #========================================================================
 #
-# Version 2.1.0, released 20 Jun 2004.
+# Version 3.0.0, released 28 Jan 2007.
 #
 # See http://backuppc.sourceforge.net.
 #
@@ -59,11 +59,11 @@ if ( $ARGV[0] !~ /^([\w\.\s-]+)$/ ) {
     exit(1);
 }
 my $client = $1;
-if ( $ARGV[1] !~ /^([\w\s.\/$(){}[\]-]+)$/ ) {
+if ( $ARGV[1] =~ m{(^|/)\.\.(/|$)} ) {
     print("$0: bad share name '$ARGV[1]'\n");
     exit(1);
 }
-my $ShareNameUM = $1;
+my $ShareNameUM = $1 if ( $ARGV[1] =~ /(.*)/ );
 my $ShareName = $bpc->fileNameEltMangle($ShareNameUM);
 if ( $ARGV[2] !~ /^(\d+)$/ ) {
     print("$0: bad compress level '$ARGV[2]'\n");
@@ -260,7 +260,7 @@ sub TarReadFileInfo
             from_to($name, $Conf{ClientCharset}, "utf8");
             from_to($linkname, $Conf{ClientCharset}, "utf8");
         }
-        printf("File now $name (hex: %s)\n", unpack("H*", $name));
+        printf("File now $name (hex: %s)\n", unpack("H*", $name));
 
         $name     =~ s{^\./+}{};
         $name     =~ s{/+\.?$}{};