Refuse a relative path on an rclone remote of type local (closes #465) #475

Merged
clawbot merged 1 commits from issue-465-rclone-local-absolute-path into next 2026-11-19 09:24:16 +01:00
Collaborator

Closes #465

NewRcloneStorer now refuses a relative path on a remote whose backend is local, before rclone opens it. The error shows the absolute form, for example use rclone://localfs//srv/backup. A path left empty counts as relative, since rclone resolves it to the working directory.

The README now says that the path after the remote name is relative and that a second slash makes it absolute.

Things the diff does not show:

  • The check runs when the destination opens, not when the config loads: the backend type is in the rclone config, which config loading does not read.
  • The backend is the named remote's own type, from fs.ParseRemote. An alias or crypt remote over a local directory is not refused, because a relative path there resolves under the directory that remote names.
  • Other remotes keep relative paths, so rclone://sftp-remote/backups still resolves against the login directory.

Disclosure: dogsled is suppressed on the fs.ParseRemote call; rclone returns five values and only the backend is used.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/vaultik/issues/465 `NewRcloneStorer` now refuses a relative path on a remote whose backend is `local`, before rclone opens it. The error shows the absolute form, for example `use rclone://localfs//srv/backup`. A path left empty counts as relative, since rclone resolves it to the working directory. The README now says that the path after the remote name is relative and that a second slash makes it absolute. Things the diff does not show: - The check runs when the destination opens, not when the config loads: the backend type is in the rclone config, which config loading does not read. - The backend is the named remote's own type, from `fs.ParseRemote`. An `alias` or `crypt` remote over a local directory is not refused, because a relative path there resolves under the directory that remote names. - Other remotes keep relative paths, so `rclone://sftp-remote/backups` still resolves against the login directory. Disclosure: `dogsled` is suppressed on the `fs.ParseRemote` call; rclone returns five values and only the backend is used. Model: opus-5-5
clawbot added the needs-review label 2026-11-19 08:35:00 +01:00
clawbot added 1 commit 2026-11-19 08:35:00 +01:00
rclone resolves a relative path on its local backend against the working
directory, so rclone://localfs/srv/backup wrote under whatever directory
vaultik ran from. Opening such a destination now fails with an error that
shows the absolute form, rclone://localfs//srv/backup. Other remotes keep
relative paths, which rclone resolves on the remote. The README says how
to write an absolute rclone path.

Model: opus-5-5
clawbot self-assigned this 2026-11-19 08:35:02 +01:00
Author
Collaborator

Verdict: PASS
Head: fe25eff9ae

A relative or empty path on an rclone remote of type local is now refused with an error showing the // absolute form, the README explains that form, and the tests cover both the refusal and other remotes keeping relative paths, which is what #465 asks for.

Model: opus-5-5

Verdict: PASS Head: fe25eff9ae9eb5a289bb0e217a6fdd77becac59b A relative or empty path on an rclone remote of type `local` is now refused with an error showing the `//` absolute form, the README explains that form, and the tests cover both the refusal and other remotes keeping relative paths, which is what https://git.eeqj.de/sneak/vaultik/issues/465 asks for. Model: opus-5-5
clawbot merged commit 9fedcbeb0a into next 2026-11-19 09:24:16 +01:00
clawbot deleted branch issue-465-rclone-local-absolute-path 2026-11-19 09:24:17 +01:00
Sign in to join this conversation.