# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2002-2007 Craig Barratt
+# Copyright (C) 2002-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
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#========================================================================
#
-# Version 3.2.0, released 31 Dec 2008.
+# Version 3.2.0, released 31 Jul 2010.
#
# See http://backuppc.sourceforge.net.
#
my($exists, $digest, $outSize, $errs) = $poolWrite->close;
$fileName =~ s{^/+}{};
- $fio->log(@$errs) if ( defined($errs) && @$errs );
+ if ( defined($errs) && @$errs ) {
+ $fio->log(@$errs);
+ $fio->{stats}{errorCnt} += @$errs;
+ }
if ( $doStats ) {
$fio->{stats}{TotalFileCnt}++;
$fio->{stats}{TotalFileSize} += $origSize;
$fio->logFileAction("create", $f) if ( $fio->{logLevel} >= 1 );
$fio->log("makePath($path, 0777)") if ( $fio->{logLevel} >= 5 );
$path = $1 if ( $path =~ /(.*)/s );
- File::Path::mkpath($path, 0, 0777) if ( !-d $path );
+ eval { File::Path::mkpath($path, 0, 0777) } if ( !-d $path );
return $fio->attribSet($f) if ( -d $path );
$fio->log("Can't create directory $path");
$fio->{stats}{errorCnt}++;