SSHBackend doesn't handle spaces in path

Bug #501093 reported by Kuno Ospald
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Medium
Unassigned

Bug Description

Duplicity version: 0.6.06
Python version: 2.5.2
OS Distro and version: Cygwin 1.7.1
Storage backend: scp
Storage backend system: Debian Linux

Description:

I run duplicity like this:

export SIG_CACHE="/home/Kuno Ospald/duplicity-cache/"
export EXCLUDE_FILE="/home/Kuno Ospald/backup-excludes"

duplicity full -v4 --archive-dir "$SIG_CACHE" --asynchronous-upload --ssh-askpass --exclude-globbing-filelist "$EXCLUDE_FILE" "/cygdrive/c/Kuno Ospald/" scp://root@test/backup

specifying an archive-dir which contains spaces and get the following error message:

...
Remote file or directory does not exist in
...

The source of this problem seems to be that the ssh backend does not encapsulate the paths for the sftp commands proper.

The file src/backends/sshbackend.py contains:

commands = ["put %s %s%s" %

If this line is replaced by:

commands = ["put \"%s\" \"%s%s\"" %

the error does not occur.

I've attached a patch, which modifies a couple of lines in sshbackend.py accordingly. I've not:

- tested the patch carefully
- checked it for possible side effects
- checked if all relevant lines are patched
- compared this behaviour with scp implementation of this backend

I would appreciate it if somebody could review and apply this patch.

Thank you.

Kuno Ospald

Revision history for this message
Kuno Ospald (kuno-ospald) wrote :
Changed in duplicity:
status: New → Fix Committed
importance: Undecided → Medium
milestone: none → 0.6.07
Changed in duplicity:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.