summaryrefslogtreecommitdiff
path: root/service/static/config.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-07-28 16:08:34 +0300
committerGitHub <[email protected]>2018-07-28 16:08:34 +0300
commitb197b282dbc31e15141a59428e9a51360068e3fe (patch)
tree0603480027683572e7ae8a33c7f33bf9d56cdde6 /service/static/config.go
parent6e56132324fde8076074e1445b354829c66ce6ef (diff)
Update config.go
Diffstat (limited to 'service/static/config.go')
-rw-r--r--service/static/config.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/service/static/config.go b/service/static/config.go
index 95fdbeee..a6931907 100644
--- a/service/static/config.go
+++ b/service/static/config.go
@@ -32,6 +32,10 @@ func (c *Config) Hydrate(cfg service.Config) error {
// Valid returns nil if config is valid.
func (c *Config) Valid() error {
+ if !c.Enable {
+ return nil
+ }
+
st, err := os.Stat(c.Dir)
if err != nil {
if os.IsNotExist(err) {