This commit is contained in:
@@ -498,6 +498,30 @@ func TestStopWalk(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestIssue4799(t *testing.T) {
|
||||
tmp, err := ioutil.TempDir("", "")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer os.RemoveAll(tmp)
|
||||
|
||||
fs := fs.NewFilesystem(fs.FilesystemTypeBasic, tmp)
|
||||
|
||||
fd, err := fs.Create("foo")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
fd.Close()
|
||||
|
||||
files, err := walkDir(fs, "/foo")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(files) != 1 || files[0].Name != "foo" {
|
||||
t.Error(`Received unexpected file infos when walking "/foo"`, files)
|
||||
}
|
||||
}
|
||||
|
||||
// Verify returns nil or an error describing the mismatch between the block
|
||||
// list and actual reader contents
|
||||
func verify(r io.Reader, blocksize int, blocks []protocol.BlockInfo) error {
|
||||
|
||||
Reference in New Issue
Block a user