changeset 1125:e61aed76463e

fix: wrong place
author sam <sam@basx.dev>
date Sun, 28 Apr 2024 17:22:20 +0700
parents 8c29e8b8ced9
children 881be2633761
files semicongine/build.nim
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/semicongine/build.nim	Sun Apr 28 17:20:17 2024 +0700
+++ b/semicongine/build.nim	Sun Apr 28 17:22:20 2024 +0700
@@ -66,8 +66,6 @@
     for resourceDir in resourceRoot.listDirs():
       let outputfile = joinPath(outdir_resources, resourceDir.splitPath().tail & ".zip")
       withdir resourceDir:
-        if outputfile.fileExists:
-          outputfile.rmFile()
         if defined(linux):
           echo &"zip -r {relativePath(outputfile, resourceDir)} ."
           exec &"zip -r {relativePath(outputfile, resourceDir)} ."
@@ -86,6 +84,9 @@
 
 proc semicongine_zip*(dir: string) =
   withdir dir.parentDir:
+    let zipFile = dir.lastPathPart & ".zip"
+    if zipFile.fileExists:
+      zipFile.rmFile()
     if defined(linux):
       exec &"zip -r {dir.lastPathPart} {dir.lastPathPart}"
     elif defined(windows):