diff --git a/ThunderstoreCLI/Commands/BuildCommand.cs b/ThunderstoreCLI/Commands/BuildCommand.cs index 3cdbeac..24ad279 100644 --- a/ThunderstoreCLI/Commands/BuildCommand.cs +++ b/ThunderstoreCLI/Commands/BuildCommand.cs @@ -225,7 +225,7 @@ public static bool AddPathToArchivePlan(ArchivePlan plan, string sourcePath, str foreach (string filename in Directory.EnumerateFiles(basePath, "*.*", SearchOption.AllDirectories)) { - var targetPath = FormatArchivePath($"{destDirectory}{filename[(basePath.Length + 1)..]}"); + var targetPath = FormatArchivePath($"{destDirectory}{Path.GetRelativePath(basePath, filename)}"); plan.AddPlan(targetPath, () => File.ReadAllBytes(filename)); } return true;