Skip to content
This repository has been archived by the owner on Feb 16, 2025. It is now read-only.

Commit

Permalink
Fix an issue preventing the conversion of older builds (< 17134)
Browse files Browse the repository at this point in the history
  • Loading branch information
gus33000 committed Feb 18, 2021
1 parent bfd94b1 commit 0ceb9c8
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions src/MediaCreationLib.NET/BootlegEditions/BootlegEditionCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -361,18 +361,25 @@ void ProgressCallback(int percent, string file)
}
else
{
string lpfilter2 = $"microsoft-windows-client-languagepack-package_{languagecode}-*-{languagecode}.esd";
string lppackage = "";
if (Directory.EnumerateFiles(UUPPath, lpfilter2, SearchOption.AllDirectories).Count() > 0)
{
lppackage = Directory.EnumerateFiles(UUPPath, lpfilter2, SearchOption.AllDirectories).First();
}
else

string lpfilter2 = $"*fre_client_{languagecode}_lp.esd";
if (Directory.EnumerateFiles(UUPPath, lpfilter2, SearchOption.AllDirectories).Count() <= 0)
{
lpfilter2 = $"microsoft-windows-client-languagepack-package_{languagecode}~*~{languagecode}~.esd";
lppackage = Directory.EnumerateFiles(UUPPath, lpfilter2, SearchOption.AllDirectories).First();
lpfilter2 = $"microsoft-windows-client-languagepack-package_{languagecode}-*-{languagecode}.esd";
if (Directory.EnumerateFiles(UUPPath, lpfilter2, SearchOption.AllDirectories).Count() <= 0)
{
lpfilter2 = $"microsoft-windows-client-languagepack-package_{languagecode}~*~{languagecode}~.esd";
if (Directory.EnumerateFiles(UUPPath, lpfilter2, SearchOption.AllDirectories).Count() <= 0)
{
progressCallback?.Invoke(Common.ProcessPhase.Error, true, 0, "Unable to find LP package!");
goto exit;
}
}
}

lppackage = Directory.EnumerateFiles(UUPPath, lpfilter2, SearchOption.AllDirectories).First();

result = imagingInterface.ApplyImage(lppackage, 1, LPFolder, PreserveACL: false, progressCallback: callback2);
if (!result)
goto exit;
Expand Down

0 comments on commit 0ceb9c8

Please sign in to comment.