]> arthur.barton.de Git - bup.git/commitdiff
save-cmd.py: remove redundant _push()
authorRob Browning <rlb@defaultvalue.org>
Mon, 3 Nov 2014 23:02:03 +0000 (17:02 -0600)
committerRob Browning <rlb@defaultvalue.org>
Sat, 31 Jan 2015 18:33:48 +0000 (12:33 -0600)
Remove a duplicate _push() from the "first_root" code.  This could cause
the creation of a tree that was immediately _pop()ped by the "finish the
current sub-tree" code, and then reintroduced (as a duplicate parent
entry) by the "start a new sub-tree" code.

Instead, just wait for the "start a new sub-tree" code to call the
relevant _push().

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
cmd/save-cmd.py

index b8e4f7aa597d999d877a31a40b36f4c40e205a71..93c693bc2265f1d98e7472bb767f3f14cb499ec3 100755 (executable)
@@ -308,16 +308,7 @@ for (transname,ent) in r.filter(extra, wantrecurse=wantrecurse_during):
     # ...].
 
     if first_root == None:
-        dir_name, fs_path = dirp[0]
         first_root = dirp[0]
-        # Not indexed, so just grab the FS metadata or use empty metadata.
-        try:
-           meta = metadata.from_path(fs_path) if fs_path else metadata.Metadata()
-        except (OSError, IOError), e:
-            add_error(e)
-            lastskip_name = dir_name
-        else:
-           _push(dir_name, meta)
     elif first_root != dirp[0]:
         root_collision = True