Skip to content

Commit

Permalink
Mock FileInfo.Sys() to return nil explicitly
Browse files Browse the repository at this point in the history
Otherwise, this function call panics on windows.


This commit was moved from ipfs/go-ipfs-files@73547d8
  • Loading branch information
masih committed Jul 22, 2021
1 parent 9345abc commit ecef908
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions files/filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ func (m *mockFileInfo) Name() string {
return m.name
}

func (m *mockFileInfo) Sys() interface{} {
return nil
}

var _ os.FileInfo = &mockFileInfo{}

func TestFileFilter(t *testing.T) {
Expand Down

0 comments on commit ecef908

Please sign in to comment.