aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Startup.Common/ApplicationPathHelper.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-09-24 13:59:34 -0400
committerGitHub <noreply@github.com>2016-09-24 13:59:34 -0400
commitc586fbd757b502885c0f1cb7050bf76d74b1fa37 (patch)
tree11f7c26605ca6b3bdb3f546c4bab6224bcfe7ca0 /MediaBrowser.Server.Startup.Common/ApplicationPathHelper.cs
parent9db0cbbb44a72cda9f828fce154a24f09cf1768a (diff)
parent48d7f686eb2212a19ee988c18c39d9fe1027d483 (diff)
Merge pull request #2189 from MediaBrowser/dev
update network share settings
Diffstat (limited to 'MediaBrowser.Server.Startup.Common/ApplicationPathHelper.cs')
-rw-r--r--MediaBrowser.Server.Startup.Common/ApplicationPathHelper.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Startup.Common/ApplicationPathHelper.cs b/MediaBrowser.Server.Startup.Common/ApplicationPathHelper.cs
index 285806791..254a782db 100644
--- a/MediaBrowser.Server.Startup.Common/ApplicationPathHelper.cs
+++ b/MediaBrowser.Server.Startup.Common/ApplicationPathHelper.cs
@@ -18,10 +18,16 @@ namespace MediaBrowser.Server.Startup.Common
useDebugPath = true;
#endif
- var programDataPath = useDebugPath ? ConfigurationManager.AppSettings["DebugProgramDataPath"] : ConfigurationManager.AppSettings["ReleaseProgramDataPath"];
+ var programDataPath = useDebugPath ?
+ ConfigurationManager.AppSettings["DebugProgramDataPath"] :
+ ConfigurationManager.AppSettings["ReleaseProgramDataPath"];
programDataPath = programDataPath.Replace("%ApplicationData%", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData));
+ programDataPath = programDataPath
+ .Replace('/', Path.DirectorySeparatorChar)
+ .Replace('\\', Path.DirectorySeparatorChar);
+
// If it's a relative path, e.g. "..\"
if (!Path.IsPathRooted(programDataPath))
{