diff --git a/src/Umbraco.Core/Constants-SystemDirectories.cs b/src/Umbraco.Core/Constants-SystemDirectories.cs index bf34aab989..40b0267d73 100644 --- a/src/Umbraco.Core/Constants-SystemDirectories.cs +++ b/src/Umbraco.Core/Constants-SystemDirectories.cs @@ -1,3 +1,5 @@ +using System; + namespace Umbraco.Cms.Core { public static partial class Constants @@ -42,7 +44,11 @@ namespace Umbraco.Cms.Core public const string Install = "~/install"; public const string AppPlugins = "/App_Plugins"; - public static string AppPluginIcons => "/Backoffice/Icons"; + + [Obsolete("Use PluginIcons instead")] + public const string AppPluginIcons = "/Backoffice/Icons"; + public const string PluginIcons = "/backoffice/icons"; + public const string CreatedPackages = "/created-packages"; diff --git a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs index c79cbf9d94..fa448bdc86 100644 --- a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs +++ b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs @@ -122,7 +122,8 @@ namespace Umbraco.Cms.Infrastructure.DependencyInjection var pluginLangFolders = appPlugins.Exists == false ? Enumerable.Empty() : appPlugins.GetDirectories() - .SelectMany(x => x.GetDirectories("Lang", SearchOption.AllDirectories)) + // Check for both Lang & lang to support case sensitive file systems. + .SelectMany(x => x.GetDirectories("?ang", SearchOption.AllDirectories).Where(x => x.Name.InvariantEquals("lang"))) .SelectMany(x => x.GetFiles("*.xml", SearchOption.TopDirectoryOnly)) .Select(x => new LocalizedTextServiceSupplementaryFileSource(x, false)); diff --git a/src/Umbraco.Web.BackOffice/Services/IconService.cs b/src/Umbraco.Web.BackOffice/Services/IconService.cs index a1d634f41b..f1ab9ffb0e 100644 --- a/src/Umbraco.Web.BackOffice/Services/IconService.cs +++ b/src/Umbraco.Web.BackOffice/Services/IconService.cs @@ -104,8 +104,18 @@ namespace Umbraco.Cms.Web.BackOffice.Services // iterate sub directories of app plugins foreach (var dir in appPlugins.EnumerateDirectories()) { - var iconPath = _hostingEnvironment.MapPathContentRoot($"{Constants.SystemDirectories.AppPlugins}/{dir.Name}{Constants.SystemDirectories.AppPluginIcons}"); - if (Directory.Exists(iconPath)) + // AppPluginIcons path was previoulsy the wrong case, so we first check for the prefered directory + // and then check the legacy directory. + var iconPath = _hostingEnvironment.MapPathContentRoot($"{Constants.SystemDirectories.AppPlugins}/{dir.Name}{Constants.SystemDirectories.PluginIcons}"); + var iconPathExists = Directory.Exists(iconPath); + + if (!iconPathExists) + { + iconPath = _hostingEnvironment.MapPathContentRoot($"{Constants.SystemDirectories.AppPlugins}/{dir.Name}{Constants.SystemDirectories.AppPluginIcons}"); + iconPathExists = Directory.Exists(iconPath); + } + + if (iconPathExists) { var dirIcons = new DirectoryInfo(iconPath).EnumerateFiles("*.svg", SearchOption.TopDirectoryOnly); icons.UnionWith(dirIcons);