Skip to content

Commit

Permalink
fix(logic): fix error reported on url parse failure
Browse files Browse the repository at this point in the history
  • Loading branch information
ccamel committed Apr 13, 2023
1 parent 3d29c12 commit 715baef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion x/logic/fs/filtered_fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ func NewFilteredFS(whitelist, blacklist []*url.URL, decorated fs.FS) *FilteredFS
func (f *FilteredFS) Open(name string) (fs.File, error) {
urlFile, err := url.Parse(name)
if err != nil {
return nil, err
return nil, &fs.PathError{
Op: "open",
Path: name,
Err: err,
}
}

if !util.WhitelistBlacklistMatches(f.whitelist, f.blacklist, util.URLMatches)(urlFile) {
Expand Down

0 comments on commit 715baef

Please sign in to comment.