Moved the sqlce db to root/App_Data/umbraco.sdf, instead of wwwroot/App_Data/umbraco.sdf
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Logging;
|
||||
|
||||
namespace Umbraco.Web.Common.AspNetCore
|
||||
{
|
||||
@@ -77,17 +74,23 @@ namespace Umbraco.Web.Common.AspNetCore
|
||||
//case LocalTempStorage.Default:
|
||||
//case LocalTempStorage.Unknown:
|
||||
default:
|
||||
return _localTempPath = MapPath("~/App_Data/TEMP");
|
||||
return _localTempPath = MapPathContentRoot("~/App_Data/TEMP");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string MapPath(string path)
|
||||
public string MapPathWebRoot(string path)
|
||||
{
|
||||
var newPath = path.TrimStart('~', '/').Replace('/', Path.DirectorySeparatorChar);
|
||||
return Path.Combine(_webHostEnvironment.WebRootPath, newPath);
|
||||
}
|
||||
|
||||
public string MapPathContentRoot(string path)
|
||||
{
|
||||
var newPath = path.TrimStart('~', '/').Replace('/', Path.DirectorySeparatorChar);
|
||||
return Path.Combine(_webHostEnvironment.ContentRootPath, newPath);
|
||||
}
|
||||
|
||||
public string ToAbsolute(string virtualPath)
|
||||
{
|
||||
if (!virtualPath.StartsWith("~/") && !virtualPath.StartsWith("/"))
|
||||
|
||||
Reference in New Issue
Block a user