From bd28df53de5f1b6227a3a0535c915294d97321de Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Sun, 24 Apr 2022 00:12:32 -0500 Subject: [PATCH] Fixed shop module loading script. --- scripts/load_shop_modules.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/load_shop_modules.py b/scripts/load_shop_modules.py index 541c76e..6810091 100644 --- a/scripts/load_shop_modules.py +++ b/scripts/load_shop_modules.py @@ -4,8 +4,8 @@ import os import shutil -PROP_SHOP_MODULES_DIR = "Props.Shop" -PROPS_SHOP_MODULES_DST = "Props/shops" +PROP_SHOP_MODULES_DIR = "./Props.Shop/" +PROPS_SHOP_MODULES_DST = "./Props/shops/" NET_VER = "net6.0" SHOP_MODULE_GLOB = "**/bin/Release/{net_ver}/publish/*.{ext}" @@ -15,11 +15,11 @@ EXTS = ["deps.json", "dll"] def load(): os.chdir(os.path.dirname(os.path.realpath(__file__))) os.chdir("..") - os.chdir(PROP_SHOP_MODULES_DIR) for ext in EXTS: - results = glob(SHOP_MODULE_GLOB.format(net_ver=NET_VER, ext=ext)) + results = glob(os.path.join(PROP_SHOP_MODULES_DIR, + SHOP_MODULE_GLOB.format(net_ver=NET_VER, ext=ext))) for result in results: - shutil.copy(result, PROPS_SHOP_MODULES_DST) + shutil.copy(result, os.path.abspath(PROPS_SHOP_MODULES_DST)) if __name__ == "__main__":