Skip to content

Commit 8f37058

Browse files
committed
Fix install failed when the Images folder is not present in the package, occured when there are no images in an app.
1 parent b6ca906 commit 8f37058

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Low Code App Editor_1/Controllers/ExportController.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,10 @@ private static void AddDomToArchive(IEngine engine, ZipArchive zip, IEnumerable<
267267

268268
private static void AddImagesToArchive(ZipArchive zip, List<string> images)
269269
{
270-
foreach(var image in images)
270+
var imageFolder = Path.Combine("AppInstallContent", "CompanionFiles", "Images") + "/"; // Slash to indicate it's a directory
271+
zip.CreateEntry(imageFolder);
272+
273+
foreach (var image in images)
271274
{
272275
zip.CreateEntryFromFile(image, Path.Combine("AppInstallContent", "CompanionFiles", "Images", Path.GetFileName(image)));
273276
}

0 commit comments

Comments
 (0)