BackupPC-users

Re: [BackupPC-users] compressed pool now backups are failing

2010-03-18 15:22:18
Subject: Re: [BackupPC-users] compressed pool now backups are failing
From: "Andy Thompson" <athompson AT mooreheadcomm DOT com>
To: "Craig Barratt" <cbarratt AT users.sourceforge DOT net>
Date: Thu, 18 Mar 2010 15:20:42 -0400
Ahh... got it.  I check the home page now and then for updates but it still 
only shows the beta0 update so I've never gone any further to check the file 
repository.  Completely missed that one.  Guess I'll just use the sourceforge 
page from now on :)

thanks, all updated and ready to test!

-andy
 
>>> Craig Barratt <cbarratt AT users.sourceforge DOT net> 3/18/2010 3:07 PM >>> 
Andy writes:

> Running 3.2beta0 already, sorry for not including that info.  What is the fix 
> that should be applied?  I will check my copy for it and make sure it's in 
> there. 

I should have been more specific.  It's fixed in 3.2.0beta1.
Here's the diff.  It just wraps an eval() around the unpack().

Craig

--- BackupPC-3.2.0beta0/lib/BackupPC/Attrib.pm  2009-04-05 11:09:15.000000000 
-0700
+++ BackupPC-3.2.0beta1/lib/BackupPC/Attrib.pm  2010-01-24 17:30:43.000000000 
-0800
@@ -30,7 +30,7 @@
 #
 #========================================================================
 #
-# Version 3.2.0beta0, released 5 April 2009.
+# Version 3.2.0beta1, released 24 Jan 2010.
 #
 # See http://backuppc.sourceforge.net.
 #
@@ -252,11 +252,18 @@
            $fd->read(\$newData, 65536);
            $data .= $newData;
        }
-       (
-            @{$a->{files}{$fileName}}{@FldsUnixW},
-            @{$a->{files}{$fileName}}{@FldsUnixN},
-            $data
-        ) = unpack("w$nFldsW N$nFldsN a*", $data);
+        eval {
+           (
+               @{$a->{files}{$fileName}}{@FldsUnixW},
+               @{$a->{files}{$fileName}}{@FldsUnixN},
+               $data
+            ) = unpack("w$nFldsW N$nFldsN a*", $data);
+        };
+        if ( $@ ) {
+            $a->{_errStr} = "unpack: Can't read attributes for $fileName from 
$file ($@)";
+            $fd->close;
+            return;
+        }
         if ( $a->{files}{$fileName}{$FldsUnixN[-1]} eq "" ) {
             $a->{_errStr} = "Can't read attributes for $fileName"
                           . " from $file";



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/