update network share settings

This commit is contained in:
Luke Pulverenti
2016-09-24 13:58:17 -04:00
parent fdc2826709
commit 48d7f686eb
9 changed files with 55 additions and 39 deletions

View File

@@ -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))
{