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.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rhimportd/ctrlWatchDir.go b/src/rhimportd/ctrlWatchDir.go
index 7ab0a12..1b08e62 100644
--- a/src/rhimportd/ctrlWatchDir.go
+++ b/src/rhimportd/ctrlWatchDir.go
@@ -72,7 +72,7 @@ func newWatchDirRequestData(conf *rhimport.Config) *watchDirRequestData {
}
type watchDirResponseData struct {
- ResponseCode int `json:"REPONSE_CODE"`
+ ResponseCode int `json:"RESPONSE_CODE"`
ErrorString string `json:"ERROR_STRING"`
Cart uint `json:"CART_NUMBER"`
Cut uint `json:"CUT_NUMBER"`
@@ -124,7 +124,9 @@ func watchDirParseRequest(conf *rhimport.Config, db *rddb.DBChan, req *os.File)
ctx.AutotrimLevel = reqdata.AutotrimLevel
ctx.UseMetaData = reqdata.UseMetaData
ctx.SourceUri = reqdata.SourceUri
- err = ctx.SourceFilePolicy.FromString(reqdata.SourceFilePolicy)
+ if reqdata.SourceFilePolicy != "" {
+ err = ctx.SourceFilePolicy.FromString(reqdata.SourceFilePolicy)
+ }
return
}