diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-10-27 08:44:19 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-10-27 08:44:19 -0400 |
commit | e92af0daa2e03d3bed50e9e22121214895448583 (patch) | |
tree | 09049273b5034ad6cafb82782805bdd88eee0ca3 | |
parent | 640a7789db0550a8bbede0fb113b7b22516c5764 (diff) | |
parent | bfa23b0075b0e2c5100cc396a4360255f47303d3 (diff) | |
download | chat-e92af0daa2e03d3bed50e9e22121214895448583.tar.gz chat-e92af0daa2e03d3bed50e9e22121214895448583.tar.bz2 chat-e92af0daa2e03d3bed50e9e22121214895448583.zip |
Merge pull request #1184 from girishso/add-trailing-slash
adds trailing slash if missing from Directory in config.json
-rw-r--r-- | utils/config.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/config.go b/utils/config.go index fd9856a67..6b34c76ed 100644 --- a/utils/config.go +++ b/utils/config.go @@ -159,6 +159,13 @@ func LoadConfig(fileName string) { configureLog(&config.LogSettings) TestConnection(&config) + if config.FileSettings.DriverName == model.IMAGE_DRIVER_LOCAL { + dir := config.FileSettings.Directory + if len(dir) > 0 && dir[len(dir)-1:] != "/" { + config.FileSettings.Directory += "/" + } + } + Cfg = &config SanitizeOptions = getSanitizeOptions(Cfg) ClientCfg = getClientConfig(Cfg) |