From a10e555095a4f7f0a6858149b3ffd6595fbd24e6 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 28 Jul 2017 11:10:06 -0400 Subject: fix i18n folder being flattened --- build/smapi.targets | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'build/smapi.targets') diff --git a/build/smapi.targets b/build/smapi.targets index b9f7e98e..ea0cfffb 100644 --- a/build/smapi.targets +++ b/build/smapi.targets @@ -34,9 +34,13 @@ { foreach (ITaskItem file in Files) { + // get file info string filePath = file.ItemSpec; string entryName = file.GetMetadata("RecursiveDir") + file.GetMetadata("Filename") + file.GetMetadata("Extension"); - + if (new FileInfo(filePath).Directory.Name.Equals("i18n", StringComparison.InvariantCultureIgnoreCase)) + entryName = Path.Combine("i18n", entryName); + + // add to zip using (Stream fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read)) using (Stream fileStreamInZip = archive.CreateEntry(entryName).Open()) { @@ -187,8 +191,8 @@ - + @@ -198,9 +202,10 @@ + - + -- cgit