aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common.Implementations/Configuration/BaseConfigurationManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Common.Implementations/Configuration/BaseConfigurationManager.cs')
-rw-r--r--MediaBrowser.Common.Implementations/Configuration/BaseConfigurationManager.cs19
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>