Fix file descriptor leak
This commit is contained in:
parent
5dbe71d675
commit
e55dfff485
1 changed files with 1 additions and 0 deletions
|
|
@ -43,6 +43,7 @@ func (s *ChangeDetector) Scan() (changed []string, deleted []string, err error)
|
|||
|
||||
func (s *ChangeDetector) loadDir(dirPath string) (children []string, lastUpdated time.Time, err error) {
|
||||
dir, err := os.Open(dirPath)
|
||||
defer dir.Close()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue