fixed plugin assembly downloads as well as debug/release detection with nuget assemblies

This commit is contained in:
LukePulverenti
2013-02-25 00:17:59 -05:00
parent b075e0a5b9
commit 364fbb9e0c
8 changed files with 90 additions and 12 deletions

View File

@@ -12,6 +12,20 @@ namespace MediaBrowser.Common.Implementations
/// </summary>
public abstract class BaseApplicationPaths : IApplicationPaths
{
/// <summary>
/// The _use debug path
/// </summary>
private bool _useDebugPath;
/// <summary>
/// Initializes a new instance of the <see cref="BaseApplicationPaths" /> class.
/// </summary>
/// <param name="useDebugPath">if set to <c>true</c> [use debug paths].</param>
protected BaseApplicationPaths(bool useDebugPath)
{
_useDebugPath = useDebugPath;
}
/// <summary>
/// The _program data path
/// </summary>
@@ -272,14 +286,9 @@ namespace MediaBrowser.Common.Implementations
/// Gets the path to the application's ProgramDataFolder
/// </summary>
/// <returns>System.String.</returns>
public static string GetProgramDataPath()
private string GetProgramDataPath()
{
#if DEBUG
string programDataPath = ConfigurationManager.AppSettings["DebugProgramDataPath"];
#else
string programDataPath = Path.Combine(ConfigurationManager.AppSettings["ReleaseProgramDataPath"], ConfigurationManager.AppSettings["ProgramDataFolderName"]);
#endif
var programDataPath = _useDebugPath ? ConfigurationManager.AppSettings["DebugProgramDataPath"] : Path.Combine(ConfigurationManager.AppSettings["ReleaseProgramDataPath"], ConfigurationManager.AppSettings["ProgramDataFolderName"]);
programDataPath = programDataPath.Replace("%CommonApplicationData%", Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData));