* Added Simplified Chinese CGI translation from Youlin Feng.
[BackupPC.git] / bin / BackupPC_dump
index 4472b23..d0925f0 100755 (executable)
@@ -70,7 +70,7 @@
 #
 #========================================================================
 #
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0, released 28 Jan 2007.
 #
 # See http://backuppc.sourceforge.net.
 #
@@ -86,6 +86,7 @@ use BackupPC::Xfer::Smb;
 use BackupPC::Xfer::Tar;
 use BackupPC::Xfer::Rsync;
 use BackupPC::Xfer::BackupPCd;
+use Encode;
 use Socket;
 use File::Path;
 use File::Find;
@@ -581,6 +582,10 @@ $NeedPostCmd = 1;
 for my $shareName ( @$ShareNames ) {
     local(*RH, *WH);
 
+    #
+    # Convert $shareName to utf8 octets
+    #
+    $shareName = encode("utf8", $shareName);
     $stat{xferOK} = $stat{hostAbort} = undef;
     $stat{hostError} = $stat{lastOutputLine} = undef;
     if ( -d "$Dir/new/$shareName" ) {
@@ -870,7 +875,7 @@ for my $shareName ( @$ShareNames ) {
     $stat{xferOK} = 0 if ( $stat{hostError} || $stat{hostAbort} );
     if ( !$stat{xferOK} ) {
         #
-        # kill off the tranfer program, first nicely then forcefully
+        # kill off the transfer program, first nicely then forcefully
         #
        if ( @xferPid ) {
            kill($bpc->sigName2num("INT"), @xferPid);
@@ -1007,9 +1012,9 @@ sub catch_signal
                    "Aborting backup up after signal $sigName\n");
 
            #
-           # Tell xfer to abort
+           # Tell xfer to abort, but only if we actually started one
            #
-           $xfer->abort($reason);
+           $xfer->abort($reason) if ( defined($xfer) );
 
            #
            # Send ALRMs to BackupPC_tarExtract if we are using it
@@ -1412,6 +1417,7 @@ sub BackupSave
     $Backups[$i]{mangle}        = 1;     # name mangling always on for v1.04+
     $Backups[$i]{xferMethod}    = $Conf{XferMethod};
     $Backups[$i]{charset}       = $Conf{ClientCharset};
+    $Backups[$i]{version}       = $bpc->Version();
     #
     # Save the main backups file
     #