summaryrefslogtreecommitdiff
path: root/src/rhimportd/ctrlWatchDir.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/rhimportd/ctrlWatchDir.go')
-rw-r--r--src/rhimportd/ctrlWatchDir.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rhimportd/ctrlWatchDir.go b/src/rhimportd/ctrlWatchDir.go
index 6985a74..7b185c0 100644
--- a/src/rhimportd/ctrlWatchDir.go
+++ b/src/rhimportd/ctrlWatchDir.go
@@ -149,6 +149,11 @@ func watchDirHandler(conf *rhimport.Config, db *rddb.DBChan, ctx *rhimport.Conte
return
}
+ if err = rhimport.NormalizeFile(ctx); err != nil {
+ watchDirErrorResponse(filename, http.StatusInternalServerError, err.Error(), "")
+ return
+ }
+
if res, err = rhimport.ImportFile(ctx); err != nil {
watchDirErrorResponse(filename, http.StatusInternalServerError, err.Error(), res.SourceFile)
return