Skip to content

Commit

Permalink
Minor Fix, repack adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadowth117 committed Jul 23, 2021
1 parent 2232224 commit 321e9ff
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
1 change: 0 additions & 1 deletion Zamboni/NicerForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Zamboni/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ private static void Main(string[] commandLineArgs)
{
outName = outFileNames[i];
}
UILogic.packIceFromDirectoryToFile(path, Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "group1.txt"), useSubDirectories, compress, forceUnencrypted, outName);
UILogic.packIceFromDirectoryToFile(path,
UILogic.ReadWhiteList(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "group1.txt")),
useSubDirectories, compress, true, forceUnencrypted, null);
}
}
}
Expand Down
22 changes: 20 additions & 2 deletions Zamboni/UILogic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,11 @@ public static void loadFilesFromDirectory(string path, bool searchSub, List<stri
}
//Sort basaed on loaded whitelist
if (group1WhiteList.Any(v => realName.Contains(v)) || (useFolderGroup && currfile.Contains("\\group1\\")))
if (CheckIfGroup1(group1WhiteList, useFolderGroup, currfile, realName))
{
group1temp.Add(file.ToArray());
} else
}
else
{
group2temp.Add(file.ToArray());
}
Expand Down Expand Up @@ -166,5 +167,22 @@ public static void loadFilesFromMemory(string[] fileNames, byte[][] fileData, Li
group1 = group1temp.ToArray();
group2 = group2temp.ToArray();
}

private static bool CheckIfGroup1(List<string> group1WhiteList, bool useFolderGroup, string currfile, string realName)
{
if (useFolderGroup && currfile.Contains("\\group"))
{
if (currfile.Contains("\\group1\\"))
{
return true;
}
}
else if (group1WhiteList.Any(v => realName.Contains(v)))
{
return true;
}

return false;
}
}
}

0 comments on commit 321e9ff

Please sign in to comment.