diff --git a/azure-rest-api-specs b/azure-rest-api-specs new file mode 160000 index 0000000..baa8141 --- /dev/null +++ b/azure-rest-api-specs @@ -0,0 +1 @@ +Subproject commit baa81416330fbb712ad9f39d2e997ba8afbbb13b diff --git a/src/Microsoft.Atlas.CommandLine/Templates/FileSystems/ProbingFileSystem.cs b/src/Microsoft.Atlas.CommandLine/Templates/FileSystems/ProbingFileSystem.cs index a5a7a4b..96cc6ee 100644 --- a/src/Microsoft.Atlas.CommandLine/Templates/FileSystems/ProbingFileSystem.cs +++ b/src/Microsoft.Atlas.CommandLine/Templates/FileSystems/ProbingFileSystem.cs @@ -38,25 +38,24 @@ namespace Microsoft.Atlas.CommandLine.Templates.FileSystems private IEnumerable WithoutPartialsFolder(string filePath) { - yield return filePath; - - const string partials = "partials/"; - if (filePath.StartsWith(partials, StringComparison.Ordinal)) + const string PartialsFolder = "partials/"; + if (filePath.StartsWith(PartialsFolder, StringComparison.Ordinal)) { - yield return filePath.Substring(partials.Length); + yield return filePath.Substring(PartialsFolder.Length); } + + yield return filePath; } private IEnumerable WithoutExtension(string filePath) { - yield return filePath; - - if (Path.GetExtension(filePath) == ".hbs") + const string HbsExtension = ".hbs"; + if (filePath.EndsWith(HbsExtension)) { - yield return Path.Combine( - Path.GetDirectoryName(filePath), - Path.GetFileNameWithoutExtension(filePath)); + yield return filePath.Substring(0, filePath.Length - HbsExtension.Length); } + + yield return filePath; } } }