summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rhimportd/ctrlWatchDir.go3
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()
}
}