Skip to content

Commit 01f3f24

Browse files
committed
convert: close the directory explicitly, don't use defer
1 parent b4c3be0 commit 01f3f24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ipfs-4-to-5/go-ds-flatfs/convert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ func Move(oldPath string, newPath string, out io.Writer) error {
118118
if err != nil {
119119
return err
120120
}
121-
defer indir.Close()
122121

123122
names, err := indir.Readdirnames(-1)
123+
indir.Close()
124124
if err != nil {
125125
return err
126126
}

0 commit comments

Comments
 (0)