Skip to content

Commit

Permalink
osv: removed trailing dot in file path
Browse files Browse the repository at this point in the history
Trailing dots in file paths can interefere with go.mod.

Fixes: #619
Signed-off-by: Paul Aldridge <[email protected]>
  • Loading branch information
paulaldridge authored and hdonnay committed May 24, 2022
1 parent ece632e commit 6a1787e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions updater/osv/osv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ func (a *apiStub) ServeHTTP(w http.ResponseWriter, r *http.Request) {
switch {
case p == "/":
p = "list.xml." + r.URL.Query().Get(`continuation-token`)
if p == "list.xml." {
p = "list.xml"
}
f, err := sys.Open(p)
if err != nil {
a.Error(err)
Expand Down
2 changes: 1 addition & 1 deletion updater/osv/s3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

func TestXML(t *testing.T) {
f, err := os.Open("testdata/list.xml.")
f, err := os.Open("testdata/list.xml")
if err != nil {
t.Fatal(err)
}
Expand Down
File renamed without changes.

0 comments on commit 6a1787e

Please sign in to comment.