diff --git a/server/backup.go b/server/backup.go index 42fc26c..c9817c2 100644 --- a/server/backup.go +++ b/server/backup.go @@ -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 }