Close the file when done
This commit is contained in:
parent
0cdfdc725c
commit
31d4c1d34f
|
@ -36,7 +36,9 @@ func (s *Server) getServerwideIgnoredFiles() (string, error) {
|
|||
return "", nil
|
||||
}
|
||||
return "", err
|
||||
} else if st.Mode()&os.ModeSymlink != 0 || st.Size() > 32*1024 {
|
||||
}
|
||||
defer f.Close()
|
||||
if st.Mode()&os.ModeSymlink != 0 || st.Size() > 32*1024 {
|
||||
// Don't read a symlinked ignore file, or a file larger than 32KiB in size.
|
||||
return "", nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user