Skip to content

Commit 4f1eb44

Browse files
committed
Fix zip creation
1 parent 5505544 commit 4f1eb44

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Elastic.Markdown/Exporters/LlmMarkdownExporter.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ public ValueTask<bool> FinishExportAsync(IDirectoryInfo outputFolder, Cancel ctx
3333
var zipPath = Path.Combine(outputDirectory, "llm.zip");
3434
using (var zip = ZipFile.Open(zipPath, ZipArchiveMode.Create))
3535
{
36-
var llmsTxt = Path.Combine(outputFolder.FullName, "llms.txt");
37-
_ = zip.CreateEntryFromFile(llmsTxt, "llms.txt");
36+
var llmsTxt = Path.Combine(outputDirectory, "llms.txt");
37+
var llmsTxtRelativePath = Path.GetRelativePath(outputDirectory, llmsTxt);
38+
_ = zip.CreateEntryFromFile(llmsTxt, llmsTxtRelativePath);
3839

3940
var markdownFiles = Directory.GetFiles(outputDirectory, "*.md", SearchOption.AllDirectories);
4041

0 commit comments

Comments
 (0)