Backup of files with unnamed group id fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Fix Released
|
Medium
|
Unassigned |
Bug Description
I ran into this issue when I tried to backup files that have group ids which are not resolvable to group names.
The problem is, that when a file does not have a group name, the default is b''. In such a case, the function stn() fails because a bytes object does not have the encode function.
To fix this issue, the line "ti.gname = b''" in path.py must be replaced with "ti.gname = u''".
» ls -lh /tmp/test
total 4,0K
-rw-r--r-- 1 82 82 5 Aug 1 23:09 hallo
» duplicity full --no-encryption /tmp/test onedrive://backup/
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: Thu Aug 1 20:53:32 2019
Traceback (innermost last):
File "/usr/local/
with_
File "/usr/local/
fn()
File "/usr/local/
do_
File "/usr/local/
full_
File "/usr/local/
globals.
File "/usr/local/
at_end = gpg.GzipWriteFi
File "/usr/local/
new_block = next(block_iter)
File "/usr/local/
result = self.process(
File "/usr/local/
(new_path, sig_path, sigTarFile))
File "/usr/local/
return function(*args)
File "/usr/local/
sigTarFile.
File "/usr/local/
buf = tarinfo.
File "/usr/local/
return self.create_
File "/usr/local/
return buf + self._create_
File "/usr/local/
stn(
File "/usr/local/
s = s.encode(encoding, errors)
AttributeError: 'bytes' object has no attribute 'encode'
Environment:
duplicity 0.8.02
Python 3.7.3
Ubuntu 19.04
Changed in duplicity: | |
status: | New → In Progress |
assignee: | nobody → Kenneth Loafman (kenneth-loafman) |
importance: | Undecided → Medium |
milestone: | none → 0.8.03 |
Changed in duplicity: | |
status: | In Progress → Fix Committed |
Changed in duplicity: | |
status: | Fix Committed → Fix Released |
assignee: | Kenneth Loafman (kenneth-loafman) → nobody |