Skip to content

Commit 696538e

Browse files
committed
Fix unix return
1 parent f1ba3de commit 696538e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/directfile/file_linux.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ func OpenFileFADV_DONTNEED(path string) (*os.File, error) {
4040
// Use FADV_DONTNEED to suggest not caching pages
4141
err = unix.Fadvise(fd, 0, 0, unix.FADV_DONTNEED)
4242
if err != nil {
43-
fmt.Println("Error setting FADV_DONTNEED:", err)
44-
return
43+
return nil, fmt.Println("Error setting FADV_DONTNEED:", err)
4544
}
45+
46+
return file, nil
4647
}

0 commit comments

Comments
 (0)