Skip to content

Commit

Permalink
select parent
Browse files Browse the repository at this point in the history
  • Loading branch information
SeriaWei committed Jul 28, 2019
1 parent e4bbcbd commit 3c144b8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tools/PackWidgetTemplate/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,17 @@ class Program
static void Main(string[] args)
{
DirectoryInfo current = new DirectoryInfo(System.IO.Directory.GetCurrentDirectory());
DirectoryInfo root = current.Parent.Parent.Parent.Parent.Parent;
DirectoryInfo root = current;
while (true)
{
root = root.Parent;
if (root.Name == "tools")
{
root = root.Parent;
break;
}
}

FileInfo[] files = root.GetFiles("Widget.*.cshtml", SearchOption.AllDirectories);

using (FileStream zipToOpen = new FileStream(Path.Combine(root.FullName, "src", "ZKEACMS.WebHost", "Templates.zip"), FileMode.Create))
Expand Down

0 comments on commit 3c144b8

Please sign in to comment.