Fixes U4-419 Improved editing xslt/razor/ruby/python files in subfolders a little bit (it now actually works)

Still needs more work to make it safer (especially entering backslashes will give YSODs and sometimes when you move to a different folder the old file stays behind)
This commit is contained in:
sebastiaan
2012-08-31 11:00:38 -02:00
parent 06e84f4a98
commit be0d843c86
2 changed files with 2 additions and 4 deletions

View File

@@ -79,9 +79,7 @@ namespace umbraco.cms.presentation.developer
// validate extension
IOHelper.ValidateFileExtension(file, validScriptingExtensions());
//// we need to move the full path and then the preceeding slash
// The textbox only needs to show the requested file (and parentfolders)
pythonFileName.Text = Request.QueryString["file"];
pythonFileName.Text = file.Replace(IOHelper.MapPath(SystemDirectories.MacroScripts), "").Substring(1).Replace(@"\", "/");
StreamReader SR;
string S;

View File

@@ -112,7 +112,7 @@ namespace umbraco.cms.presentation.developer
IOHelper.ValidateFileExtension(file, new List<string>() { "xslt", "xsl" });
xsltFileName.Text = file.Replace(IOHelper.MapPath(SystemDirectories.Xslt), "").Substring(1);
xsltFileName.Text = file.Replace(IOHelper.MapPath(SystemDirectories.Xslt), "").Substring(1).Replace(@"\", "/");
StreamReader SR;
string S;