فهرست منبع

Small fix in image generator script.

slow_tiger 1 سال پیش
والد
کامیت
0dabdd2084
1فایلهای تغییر یافته به همراه2 افزوده شده و 3 حذف شده
  1. 2 3
      build_image_cache.py

+ 2 - 3
build_image_cache.py

@@ -141,8 +141,7 @@ def build_all_images(repo: str):
     repo = Path(repo).expanduser()
     repo = Path(repo).expanduser()
 
 
     pattern_matching = ["*.png", "*.jpg"]
     pattern_matching = ["*.png", "*.jpg"]
-    filepaths = get_files_by_extension(repo, pattern_matching, True)
-
+    filepaths = get_files_by_extension(repo, pattern_matching, relative_path=True)
     images = [
     images = [
         (str(Path(filepath).parent).split("/")[0], filepath) for filepath in filepaths
         (str(Path(filepath).parent).split("/")[0], filepath) for filepath in filepaths
     ]
     ]
@@ -167,7 +166,7 @@ def build_images(repo: str, oldrev: str, newrev: str):
     repo = Path(repo).expanduser()
     repo = Path(repo).expanduser()
 
 
     pattern_matching = [".png", ".jpg"]
     pattern_matching = [".png", ".jpg"]
-    filepaths = get_files_by_extension(repo, pattern_matching, True)
+    filepaths = get_files_by_extension(repo, pattern_matching, relative_path=True)
 
 
     images = [
     images = [
         (str(Path(filepath).parent).split("/")[0], filepath) for filepath in filepaths
         (str(Path(filepath).parent).split("/")[0], filepath) for filepath in filepaths