Skip to content

Commit 77054a1

Browse files
committed
fix linter
1 parent 7295023 commit 77054a1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/downloader/downloader.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,11 @@ func isDirEmpty(path string) (bool, error) {
248248
if err != nil {
249249
return false, err
250250
}
251-
defer f.Close()
251+
defer func() {
252+
if err = f.Close(); err != nil {
253+
slog.Error(fmt.Sprintf("failed to close directory path: %s", err.Error()))
254+
}
255+
}()
252256

253257
// If we get something other than an err, it's not empty
254258
_, err = f.Readdir(1)

0 commit comments

Comments
 (0)