From bdce9e4c527111d852b5d06b291ebbb085517f1b Mon Sep 17 00:00:00 2001 From: Kenny Workman Date: Fri, 21 Nov 2025 15:00:00 -0800 Subject: [PATCH] catch special file types --- custom_fsync/sync.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/custom_fsync/sync.go b/custom_fsync/sync.go index c803140e22..6e00583eeb 100644 --- a/custom_fsync/sync.go +++ b/custom_fsync/sync.go @@ -18,6 +18,11 @@ func main() { return err } + mode := di.Type() + if mode&os.ModeType != 0 { // ModeType mask catches all special types + return nil + } + f, err := os.OpenFile(path, os.O_RDONLY, 0) if err != nil { fmt.Fprintf(os.Stderr, "Error opening file: %s: %v\n", path, err)