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 is contained in:
sneak committed 2026-11-19 07:24:47 +00:00
1 parent d747ddef3a
commit 4e084a2746
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.
@@ -288,7 +289,7 @@ func (f *FileStorer) DeletePartialUploads(ctx context.Context, prefix string) er
// Info returns human-readable storage location information.
func (f *FileStorer) Info() Info {
return Info{
Type: schemeFile,
Type: storageurl.SchemeFile,
Location: f.basePath,
}
}