rclone backend fails with spaces in path names - fix inside
I have:
- ([x] when completed)
-
searched https://gitlab.com/duplicity/duplicity/-/issues for similar issues. If you find a similar issue and the issue is still open, add a comment to the existing issue instead of opening a new one. If you find a Closed issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one. -
searched https://bugs.launchpad.net/duplicity for similar issues. If you find a similar issue, open a new issue on here and include a link to the original issue in the body of your new one. -
tested that this issue still occurs on the latest stable snap (install instructions: https://snapcraft.io/duplicity), please include the snap version ( snap info duplicity | grep installed) output:installed: x.xx.xx (xx) -
ideally, tested that this issue still occurs on the latest edge snap, if you can test without risking your data. Please include the snap version output: installed: x.xx.xx (xx)
Summary
rclone backend creates an invalid rclone command line, when spaces are present in the path name
Environment
Debian sid
duplicity master
duplicity --no-encryption --name="A B C" "/redacted/A B C" "rclone://redacted://A B C"
Steps to reproduce
Use above command line, get the following output
duplicity --no-encryption --name="A B C" "/redacted/A B C" "rclone://redacted://A B C"
Usage:
rclone lsf remote:path [flags]
Flags:
--absolute Put a leading / in front of path names.
--csv Output in CSV format.
-d, --dir-slash Append a slash to directory names. (default true)
--dirs-only Only list directories.
--files-only Only list files.
-F, --format string Output format - see help for details (default "p")
--hash h Use this hash when h is used in the format MD5|SHA-1|DropboxHash (default "MD5")
-h, --help help for lsf
-R, --recursive Recurse into the listing.
-s, --separator string Separator for the items in the format. (default ";")
Use "rclone [command] --help" for more information about a command.
Use "rclone help flags" for to see the global flags.
Use "rclone help backends" for a list of supported services.
Command lsf needs 1 arguments maximum: you provided 3 non flag arguments: ["redacted:/A" "B" "C"]
Attempt 1 failed. BackendException: Usage:
rclone lsf remote:path [flags]
Flags:
--absolute Put a leading / in front of path names.
--csv Output in CSV format.
-d, --dir-slash Append a slash to directory names. (default true)
--dirs-only Only list directories.
--files-only Only list files.
-F, --format string Output format - see help for details (default "p")
--hash h Use this hash when h is used in the format MD5|SHA-1|DropboxHash (default "MD5")
-h, --help help for lsf
-R, --recursive Recurse into the listing.
-s, --separator string Separator for the items in the format. (default ";")
Use "rclone [command] --help" for more information about a command.
Use "rclone help flags" for to see the global flags.
Use "rclone help backends" for a list of supported services.
Command lsf needs 1 arguments maximum: you provided 3 non flag arguments: ["redacted:/A" "B" "C"]
What is the current bug behaviour?
See above. Backup fails due to invalid rclone arguments
What is the expected correct behaviour?
rclone list put get etc. commands work, backup does not fail.
Possible fixes
I patched it like this. duplicity-rclone-spaces-path-fix.patch