]> arthur.barton.de Git - bup.git/commitdiff
restore: when -vv is specified, don't crash when printing paths
authorJean-Paul Marmorat <jean-paul.marmorat@mines-paristech.fr>
Fri, 6 Nov 2020 15:07:39 +0000 (16:07 +0100)
committerRob Browning <rlb@defaultvalue.org>
Sat, 19 Dec 2020 22:32:04 +0000 (16:32 -0600)
Without the fix restore would crash like this:

  TypeError: can't concat str to bytes

Signed-off-by: Jean-Paul Marmorat <jean-paul.marmorat@mines-paristech.fr>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
[rlb@defaultvalue.org: add angle brackets around email address in
 signed-off-by; adjust commit message]
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/cmd/restore-cmd.py

index 7c8ca262ff3b0d1aba6eddb6049b4ff9493d88ee..37977248c45989707021c77000ed5e7544f67052 100755 (executable)
@@ -192,7 +192,7 @@ def restore(repo, parent_path, name, item, top, sparse, numeric_ids, owner_map,
             out.write(b'%s@ -> %s\n' % (fullname, meta.symlink_target))
     else:
         if verbosity >= 2:
-            out.write(fullname + '\n')
+            out.write(fullname + b'\n')
 
     orig_cwd = os.getcwd()
     try: