From 000c74c25369617528085a5f297dd86eda978ced Mon Sep 17 00:00:00 2001 From: slace Date: Tue, 11 Aug 2009 13:03:18 +0000 Subject: [PATCH] DO NOT DOWNLOAD. DOWNLOAD LATEST STABLE FROM RELEASE TAB Adding patch #3551 to code [TFS Changeset #57955] --- umbraco/presentation/umbraco/create/standardTasks.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/umbraco/presentation/umbraco/create/standardTasks.cs b/umbraco/presentation/umbraco/create/standardTasks.cs index 35caf4339b..0e3f901870 100644 --- a/umbraco/presentation/umbraco/create/standardTasks.cs +++ b/umbraco/presentation/umbraco/create/standardTasks.cs @@ -53,6 +53,18 @@ namespace umbraco string fileName = _alias.Substring(_alias.IndexOf("|||") + 3, _alias.Length - _alias.IndexOf("|||") - 3).Replace(" ", ""); string xsltTemplateSource = System.Web.HttpContext.Current.Server.MapPath(GlobalSettings.Path + "/xslt/templates/" + template); string xsltNewFilename = System.Web.HttpContext.Current.Server.MapPath(GlobalSettings.Path + "/../xslt/" + fileName + ".xslt"); + + if (fileName.Contains("/")) //if there's a / create the folder structure for it + { + string[] folders = fileName.Split("/".ToCharArray()); + string xsltBasePath = System.Web.HttpContext.Current.Server.MapPath(GlobalSettings.Path + "/../xslt/"); + for (int i = 0; i < folders.Length - 1; i++) + { + xsltBasePath = System.IO.Path.Combine(xsltBasePath, folders[i]); + System.IO.Directory.CreateDirectory(xsltBasePath); + } + } + // System.IO.File.Copy(xsltTemplateSource, xsltNewFilename, false); // update with xslt references