unicode errors in sigtar2path_iter on filenames with non ascii characters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Fix Released
|
Medium
|
Unassigned |
Bug Description
when encountering files with non ascii (latin-1 special chars such as u umlaut, etc.) duplicity breaks with the following error:
--- Start running command BKP at 20:51:28.814 ---
Traceback (innermost last):
File "/usr/bin/
with_
File "/usr/bin/
fn()
File "/usr/bin/
do_
File "/usr/bin/
incremental
File "/usr/bin/
globals.
File "/usr/bin/
globals.
File "/usr/lib64/
data = block_iter.
File "/usr/lib64/
result = self.process(
File "/usr/lib64/
for new_path, sig_path in collated:
File "/usr/lib64/
relem2 = next(riter2)
File "/usr/lib64/
refresh_
File "/usr/lib64/
new_triple = get_triple(
File "/usr/lib64/
path = next(path_
File "/usr/lib64/
index = tuple(name.
UnicodeDecodeE
20:53:06.906 Task 'BKP' failed with exit code '30'.
--- Finished state FAILED 'code 30' at 20:53:06.906 - Runtime 00:01:38.091 ---
the filename it chokes on is this one:
/var/www/
problem seems unicode split to tokenize a string that was treated as a bytestring before.
patch below fixes this for me, and seems in line with the intent of the code, but I haven't spend a lot of time understanding the (unicode) filename handling in duplicity, so I might be wrong.
some version info:
Start duply v2.1, time is 2018-10-14 20:51:28.
Using profile '/etc/duply/
Using installed duplicity version 0.8.00, python 2.7.15 (/usr/bin/python2), gpg 1.4.22 (Home: ~/.gnupg), awk 'GNU Awk 4.1.4, API: 1.1 (GNU MPFR 3.1.6-p2, GNU MP 6.1.2)', grep 'grep (GNU grep) 3.1', bash '4.4.12(1)-release (x86_64-
best regards,
Bas Hulsken
diff -Naupr duplicity/
--- duplicity/
+++ duplicity-
@@ -246,7 +246,7 @@ def sigtar2path_
else:
raise DiffDirExceptio
- index = tuple(name.
+ index = tuple(name.
if not index[-1]:
index = index[:-1] # deal with trailing /, ""
Changed in duplicity: | |
assignee: | nobody → Kenneth Loafman (kenneth-loafman) |
importance: | Undecided → Medium |
milestone: | none → 0.8.00 |
status: | New → In Progress |
Changed in duplicity: | |
status: | In Progress → Fix Committed |
assignee: | Kenneth Loafman (kenneth-loafman) → nobody |
summary: |
- unicode errors on filenames with non ascii characters + unicode errors in sigtar2path_iter on filenames with non ascii + characters |
Changed in duplicity: | |
status: | Fix Committed → Fix Released |