# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2001-2007 Craig Barratt
+# Copyright (C) 2001-2009 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
#
#========================================================================
#
-# Version 3.2.0beta0, released 5 April 2009.
+# Version 3.2.0, released 31 Jul 2010.
#
# See http://backuppc.sourceforge.net.
#
$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";