Check storage_url with the storage parser at config load (closes #468)
check / check (push) Waiting to run

config set accepted rclone:// values that every command then refused:
no remote name, parameters in the remote name, a query parameter. The
config only checked the URL's prefix, because config could not import
the parser from storage, which imports config.

The parser moves from internal/storage to a new package,
internal/storageurl, that both import. ParseStorageURL becomes
storageurl.Parse. Loading the config now runs it on every storage_url,
so config set refuses such a value and leaves the file unchanged.

Model: opus-5-5
This commit was merged in pull request #472.
This commit is contained in:
clawbot committed 2026-11-19 14:33:22 +01:00
1 parent be362080d3
commit 57b5cb327b
8 files changed
+133 -129

No files matched your search

+2 -1
View File
@@ -16,6 +16,7 @@ import (
"github.com/rclone/rclone/fs/config"
"github.com/rclone/rclone/fs/config/configfile"
"github.com/rclone/rclone/fs/operations"
"sneak.berlin/go/vaultik/internal/storageurl"
// Import all rclone backends
_ "github.com/rclone/rclone/backend/all"
@@ -288,7 +289,7 @@ func (r *RcloneStorer) Info() Info {
}
return Info{
Type: schemeRclone,
Type: storageurl.SchemeRclone,
Location: location,
}
}