diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2020-04-07 12:09:48 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-04-07 12:09:48 +0200 |
commit | 42fcdbf1a85c8e23ccc25a0e7e66b3a51b8f11dd (patch) | |
tree | 3344313b57b160a877044f56eec3d8e3c1c1669c /vendor/github.com/xeipuuv/gojsonschema/jsonLoader.go | |
parent | 64b6a197339e0436168e254ef9caf674ee9ff932 (diff) | |
download | podman-42fcdbf1a85c8e23ccc25a0e7e66b3a51b8f11dd.tar.gz podman-42fcdbf1a85c8e23ccc25a0e7e66b3a51b8f11dd.tar.bz2 podman-42fcdbf1a85c8e23ccc25a0e7e66b3a51b8f11dd.zip |
vendor c/image v5.4.2
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'vendor/github.com/xeipuuv/gojsonschema/jsonLoader.go')
-rw-r--r-- | vendor/github.com/xeipuuv/gojsonschema/jsonLoader.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vendor/github.com/xeipuuv/gojsonschema/jsonLoader.go b/vendor/github.com/xeipuuv/gojsonschema/jsonLoader.go index 4f57ff789..5d88af263 100644 --- a/vendor/github.com/xeipuuv/gojsonschema/jsonLoader.go +++ b/vendor/github.com/xeipuuv/gojsonschema/jsonLoader.go @@ -33,6 +33,7 @@ import ( "io" "io/ioutil" "net/http" + "net/url" "os" "path/filepath" "runtime" @@ -145,6 +146,12 @@ func (l *jsonReferenceLoader) LoadJSON() (interface{}, error) { if reference.HasFileScheme { filename := strings.TrimPrefix(refToURL.String(), "file://") + filename, err = url.QueryUnescape(filename) + + if err != nil { + return nil, err + } + if runtime.GOOS == "windows" { // on Windows, a file URL may have an extra leading slash, use slashes // instead of backslashes, and have spaces escaped |