* Added BackupPC::Xfer::Protocol as a common class for each Xfer
[BackupPC.git] / lib / BackupPC / PoolWrite.pm
index c17cbee..415c67f 100644 (file)
@@ -38,7 +38,7 @@
 #   Craig Barratt  <cbarratt@users.sourceforge.net>
 #
 # COPYRIGHT
-#   Copyright (C) 2001-2003  Craig Barratt
+#   Copyright (C) 2001-2007  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
@@ -56,7 +56,7 @@
 #
 #========================================================================
 #
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.1.0, released 25 Nov 2007.
 #
 # See http://backuppc.sourceforge.net.
 #
@@ -438,10 +438,11 @@ sub write
                 push(@{$a->{errors}},
                         "Unable to open $a->{fileName}"
                       . " for writing after link fail\n");
+            } else {
+                $a->filePartialCopy($a->{files}[$i]->{fh}, $a->{fhOut},
+                                    $a->{nWrite});
+                $a->{fhOut}->close;
             }
-            $a->filePartialCopy($a->{files}[$i]->{fh}, $a->{fhOut},
-                                $a->{nWrite});
-            $a->{fhOut}->close;
             last;
         }
         #