Cleanup with Paramiko backend does not remove files due to missing filename byte decoding
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Duplicity Version: 0.8.12;
Python Version: 3.8.3;
OS Distro and version: Arch Linux 2020-07-15;
Target filesystem: Linux (Ubuntu 18.04.4 LTS) via scp (paramiko)
Log output does not reveal underlying issue.
When running duplicity --cleanup --force scp://user@
Further investigation revealed the path used by SSHParamikoBack
rm '/path/
rm '/path/
rm '/path/
The cause of this is that the 'filename' parameter to _delete() is a byte object.
The implementations for _put() and _get() in the same backend convert the remote filename to a string as follows:
def _get(self, remote_filename, local_path):
# remote_filename is a byte object, not str or unicode
Note: other backends use the duplicity.
Proposed solution (see attached git patch file):
1. Replace remote filename decoding in other SSHParamikoBackend methods with util.fsdecode()
2. Add 'filename = util.fsdecode(
Changed in duplicity: | |
status: | New → Fix Committed |
importance: | Undecided → Medium |
milestone: | none → 0.8.15 |
Changed in duplicity: | |
status: | Fix Committed → Fix Released |