Implementors using Umbraco.Tests.Integration won't have to override GetLocalizedTextService
(cherry picked from commitb0016687eb) (cherry picked from commit2bb56f1b81)
This commit is contained in:
committed by
Sebastiaan Janssen
parent
a325ba339b
commit
599ec18ecc
@@ -123,7 +123,18 @@ public static class UmbracoBuilderExtensions
|
||||
|
||||
var currFolder = new DirectoryInfo(srcFolder);
|
||||
|
||||
var uiProject = currFolder.GetDirectories("Umbraco.Web.UI", SearchOption.TopDirectoryOnly).First();
|
||||
if (!currFolder.Exists)
|
||||
{
|
||||
currFolder = new DirectoryInfo(Path.GetTempPath());
|
||||
}
|
||||
|
||||
var uiProject = currFolder.GetDirectories("Umbraco.Web.UI", SearchOption.TopDirectoryOnly).FirstOrDefault();
|
||||
if (uiProject == null)
|
||||
{
|
||||
uiProject = new DirectoryInfo(Path.Combine(Path.GetTempPath(), "Umbraco.Web.UI"));
|
||||
uiProject.Create();
|
||||
}
|
||||
|
||||
var mainLangFolder = new DirectoryInfo(Path.Combine(uiProject.FullName, globalSettings.Value.UmbracoPath.TrimStart("~/"), "config", "lang"));
|
||||
|
||||
return new LocalizedTextServiceFileSources(
|
||||
|
||||
Reference in New Issue
Block a user