Commit d01aa2c
fix(storage): normalize repository names to '/' separators on Windows (#4188)
filepath.Rel returns OS-specific separators, so on Windows the repo
walkers (GetRepositories, GetNextRepository, GetNextRepositories)
produced backslash-separated names such as 'openshift4\ose-cli'. Those
names fail FullNameRegexp validation in ValidateRepo, which only
accepts '/' as a component separator, so every namespaced repository
was silently dropped. As a result /v2/_catalog returned an empty list,
and garbage collection, scrub, and metadb never saw any repositories.
Convert each relative path with filepath.ToSlash (a no-op on Unix)
before validation, matching the existing ToSlash usage elsewhere in
imagestore.go.
Signed-off-by: zaldre <zaldre@zaldre.com>
Co-authored-by: zaldre <zaldre@zaldre.com>1 parent 4cb8ea9 commit d01aa2c
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| 313 | + | |
| 314 | + | |
313 | 315 | | |
314 | 316 | | |
315 | 317 | | |
| |||
384 | 386 | | |
385 | 387 | | |
386 | 388 | | |
| 389 | + | |
| 390 | + | |
387 | 391 | | |
388 | 392 | | |
389 | 393 | | |
| |||
435 | 439 | | |
436 | 440 | | |
437 | 441 | | |
| 442 | + | |
| 443 | + | |
438 | 444 | | |
439 | 445 | | |
440 | 446 | | |
| |||
0 commit comments