Fixed application path issue.

This commit is contained in:
kay.one 2011-11-02 19:09:00 -07:00
commit bb1f6649b5
2 changed files with 12 additions and 4 deletions

View file

@ -7,6 +7,7 @@ namespace NzbDrone.Common
{
public class EnviromentProvider
{
public const string IIS_FOLDER_NAME = "iisexpress";
#if DEBUG
private static readonly bool isInDebug = true;
@ -45,7 +46,7 @@ namespace NzbDrone.Common
{
get
{
var dir = new FileInfo(Environment.CurrentDirectory).Directory;
var dir = new DirectoryInfo(Environment.CurrentDirectory);
while (!ContainsIIS(dir))
{
@ -79,7 +80,7 @@ namespace NzbDrone.Common
{
get
{
var path = Path.Combine(WebRoot, "App_data");
var path = Path.Combine(WebRoot, "App_Data");
if (!Directory.Exists(path))
Directory.CreateDirectory(path);
@ -121,7 +122,7 @@ namespace NzbDrone.Common
private static bool ContainsIIS(DirectoryInfo dir)
{
return dir.GetDirectories("iisexpress").Length != 0;
return dir.GetDirectories(IIS_FOLDER_NAME).Length != 0;
}
}
}