From: Michael Vrable <mvrable@cs.ucsd.edu>
Date: Wed, 12 Dec 2007 19:36:50 +0000 (-0800)
Subject: Fix a bug that caused blocks not to be properly re-used on checksum match.
X-Git-Url: http://git.vrable.net/?a=commitdiff_plain;h=0ab3b10e857ee5916f1765e3b8f773446cf4de45;p=cumulus.git

Fix a bug that caused blocks not to be properly re-used on checksum match.
---

diff --git a/scandir.cc b/scandir.cc
index 9727133..3a56d9c 100644
--- a/scandir.cc
+++ b/scandir.cc
@@ -189,7 +189,7 @@ int64_t dumpfile(int fd, dictionary &file_info, const string &path,
                 ref = ObjectReference(ObjectReference::REF_ZERO);
                 ref.set_range(0, bytes);
             } else {
-                ObjectReference ref = db->FindObject(block_csum, bytes);
+                ref = db->FindObject(block_csum, bytes);
             }
 
             // Store a copy of the object if one does not yet exist