summaryrefslogtreecommitdiff
path: root/src/rhimportd/ctrlWatchDir.go
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-03-12 22:30:43 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-03-12 22:30:43 (GMT)
commit5fa11f11a0b5f71a94a8d18270a7baf4fb016330 (patch)
tree0a2f0719293578fce46ac6d9a6e25fb3f75cca1d /src/rhimportd/ctrlWatchDir.go
parentb40537d2a9730bf6db7cadc60eef357668b5dbf1 (diff)
fixed typos at json format for watch-dir and web-simple responses
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
}