Cleanup tests + Fixed issue in IOHelper related to contentroot vs webroot

Signed-off-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
Bjarke Berg
2020-10-23 13:58:30 +02:00
parent 523a155d88
commit b2b297ac8a
3 changed files with 9 additions and 9 deletions

View File

@@ -122,7 +122,7 @@ namespace Umbraco.Core.IO
var mappedRoot = MapPath(_hostingEnvironment.ApplicationVirtualPath);
if (filePath.StartsWith(mappedRoot) == false)
filePath = MapPath(filePath);
filePath = _hostingEnvironment.MapPathContentRoot(filePath);
// yes we can (see above)
//// don't trust what we get, it may contain relative segments
@@ -132,7 +132,7 @@ namespace Umbraco.Core.IO
{
var validDir = dir;
if (validDir.StartsWith(mappedRoot) == false)
validDir = MapPath(validDir);
validDir = _hostingEnvironment.MapPathContentRoot(validDir);
if (PathStartsWith(filePath, validDir, Path.DirectorySeparatorChar))
return true;