Skip to content

Commit 58e6ddb

Browse files
committed
Adding check for HttpRuntime.AppDomainAppVirtualPath being default
1 parent 0691160 commit 58e6ddb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/UmbracoFileSystemProviders.Azure/FileSystemVirtualPathProvider.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,14 @@ private string FormatVirtualPathPrefix(string prefix)
183183
prefix = prefix.Replace("\\", "/");
184184
prefix = prefix.StartsWith("/") ? prefix : string.Concat("/", prefix);
185185
prefix = prefix.EndsWith("/") ? prefix : string.Concat(prefix, "/");
186+
187+
// if Umbraco is running in a virtual path, the path then needs to be included in the prefix
188+
if (HttpRuntime.AppDomainAppVirtualPath != "/")
189+
{
190+
return HttpRuntime.AppDomainAppVirtualPath + prefix;
191+
}
192+
186193
return prefix;
187-
// return HttpRuntime.AppDomainAppVirtualPath + prefix;
188194
}
189195

190196
/// <summary>

0 commit comments

Comments
 (0)