pass --error-on-no-transfer to 'rclone copyto'
authorNathan Todd-Stone <me@nathants.com>
Wed, 9 Jun 2021 23:33:15 +0000 (13:33 -1000)
committerSean Whitton <spwhitton@spwhitton.name>
Tue, 15 Jun 2021 20:47:21 +0000 (13:47 -0700)
GET and PUT are meant to exit nonzero on failure, and without this flag, they
always exit zero when rclone is used, even when a file is not found.  That
confuses other parts of the code.

Signed-off-by: Nathan Todd-Stone <me@nathants.com>
git-remote-gcrypt

index c519bf855f441670d948678155ac2add8cf8ac52..7e7240f9d191d43e1e03707c6b7eab87bfdf23ba 100755 (executable)
@@ -238,7 +238,7 @@ GET()
                (exec 0>&-; rsync -I -W "$(rsynclocation "$1")"/"$2" "$3" >&2)
        elif isurl rclone "$1"
        then
-               (exec 0>&-; rclone copyto "${1#rclone://}"/"$2" "$3" >&2)
+               (exec 0>&-; rclone copyto --error-on-no-transfer "${1#rclone://}"/"$2" "$3" >&2)
        elif islocalrepo "$1"
        then
                cat "$1/$2" > "$3"
@@ -258,7 +258,7 @@ PUT()
                rsync $Conf_rsync_put_flags -I -W "$3" "$(rsynclocation "$1")"/"$2" >&2
        elif isurl rclone "$1"
        then
-               rclone copyto "$3" "${1#rclone://}"/"$2" >&2
+               rclone copyto --error-on-no-transfer "$3" "${1#rclone://}"/"$2" >&2
        elif islocalrepo "$1"
        then
                cat >| "$1/$2" < "$3"