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
@@ -9,6 +9,7 @@ import (
"strings"
"github.com/spf13/afero"
"sneak.berlin/go/vaultik/internal/storageurl"
)
// FileStorer implements Storer using the local filesystem.
@@ -301,7 +302,7 @@ func (f *FileStorer) ListPartialUploads(
// Info returns human-readable storage location information.
func (f *FileStorer) Info() Info {
return Info{
Type: schemeFile,
Type: storageurl.SchemeFile,
Location: f.basePath,
}
}