diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-01-21 04:17:17 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-01-21 04:17:17 (GMT) |
commit | 3298e7a583f9825dbe77c26f8e60c78c963cd26c (patch) | |
tree | 4b8d613c5e159fa132143014efeae3aaa9f41592 /src | |
parent | ccef8833c877597b966c4349132cb1f556aa2cad (diff) |
watchDir never closed directories on error
Diffstat (limited to 'src')
-rw-r--r-- | src/rhimportd/ctrlWatchDir.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rhimportd/ctrlWatchDir.go b/src/rhimportd/ctrlWatchDir.go index 7556f5d..7290597 100644 --- a/src/rhimportd/ctrlWatchDir.go +++ b/src/rhimportd/ctrlWatchDir.go @@ -208,13 +208,16 @@ func StartWatchDir(dirname string, conf *rhimport.Config, db *rddb.DBChan) { } if i, err := dir.Stat(); err != nil { rhl.Printf("watch-dir-ctrl: %s", err) + dir.Close() continue } else { if !i.IsDir() { rhl.Printf("watch-dir-ctrl: %s is not a directory", dirname) + dir.Close() continue } } watchDirRun(dir, conf, db) + dir.Close() } } |