aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Startup.Common/ApplicationPathHelper.cs
diff options
context:
space:
mode:
authorhatharry <hatharry@hotmail.com>2016-10-11 17:10:00 +1300
committerGitHub <noreply@github.com>2016-10-11 17:10:00 +1300
commit9b0ac4bde5beb74703a258d582f477c6411ec6ec (patch)
treea59864414d58bd01c86085a36355fc553dd43736 /MediaBrowser.Server.Startup.Common/ApplicationPathHelper.cs
parent71386f0ceb15ce0bac2e588f90781a4bd274fe68 (diff)
parentcb26cb94579b772fa7825c6769dc7ace38217168 (diff)
Merge pull request #28 from MediaBrowser/dev
Dev
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))
{