Skip to content

Commit

Permalink
Fix install failed when the Images folder is not present in the packa…
Browse files Browse the repository at this point in the history
…ge, occured when there are no images in an app.
  • Loading branch information
ArneMaes0 committed Nov 9, 2023
1 parent b6ca906 commit 8f37058
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Low Code App Editor_1/Controllers/ExportController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,10 @@ private static void AddDomToArchive(IEngine engine, ZipArchive zip, IEnumerable<

private static void AddImagesToArchive(ZipArchive zip, List<string> images)
{
foreach(var image in images)
var imageFolder = Path.Combine("AppInstallContent", "CompanionFiles", "Images") + "/"; // Slash to indicate it's a directory
zip.CreateEntry(imageFolder);

foreach (var image in images)
{
zip.CreateEntryFromFile(image, Path.Combine("AppInstallContent", "CompanionFiles", "Images", Path.GetFileName(image)));
}
Expand Down

0 comments on commit 8f37058

Please sign in to comment.