diff options
| author | Tavares André <tavares_and@hotmail.com> | 2015-04-30 18:20:10 +0200 |
|---|---|---|
| committer | Tavares André <tavares_and@hotmail.com> | 2015-04-30 18:20:10 +0200 |
| commit | fcb2bc2c8e37e75ffbd324bf242eed5eb4372fb5 (patch) | |
| tree | b79635656f847f4920acdfa3c0910c2ce2c2c36c /MediaBrowser.Common.Implementations/Configuration/BaseConfigurationManager.cs | |
| parent | adc52db15a497a003cbea77cf11d907390390e96 (diff) | |
| parent | a4e28a60a4de902ef58ecfef54cb56250c23e5e7 (diff) | |
Merge branch 'dev' of https://github.com/MediaBrowser/MediaBrowser into dev
Diffstat (limited to 'MediaBrowser.Common.Implementations/Configuration/BaseConfigurationManager.cs')
| -rw-r--r-- | MediaBrowser.Common.Implementations/Configuration/BaseConfigurationManager.cs | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/MediaBrowser.Common.Implementations/Configuration/BaseConfigurationManager.cs b/MediaBrowser.Common.Implementations/Configuration/BaseConfigurationManager.cs index c53947e44..1b9146644 100644 --- a/MediaBrowser.Common.Implementations/Configuration/BaseConfigurationManager.cs +++ b/MediaBrowser.Common.Implementations/Configuration/BaseConfigurationManager.cs @@ -164,9 +164,22 @@ namespace MediaBrowser.Common.Implementations.Configuration /// </summary> private void UpdateCachePath() { - ((BaseApplicationPaths)CommonApplicationPaths).CachePath = string.IsNullOrEmpty(CommonConfiguration.CachePath) ? - null : - CommonConfiguration.CachePath; + string cachePath; + + if (string.IsNullOrWhiteSpace(CommonConfiguration.CachePath)) + { + cachePath = null; + } + else if (CommonConfiguration.EnableCustomPathSubFolders) + { + cachePath = Path.Combine(CommonConfiguration.CachePath, "cache"); + } + else + { + cachePath = CommonConfiguration.CachePath; + } + + ((BaseApplicationPaths)CommonApplicationPaths).CachePath = cachePath; } /// <summary> |
