From 6d5af57ebceb70479697e994ac1da0737474bf74 Mon Sep 17 00:00:00 2001 From: Rikka Date: Sun, 2 Jul 2023 11:41:04 +0800 Subject: [PATCH] fix: Fix simlink path issue https://github.com/casualsnek/waydroid_script/issues/101 Relative path fails when using symlink. Replace it with absolute path. --- stuff/general.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stuff/general.py b/stuff/general.py index f377e0b..3dc0962 100644 --- a/stuff/general.py +++ b/stuff/general.py @@ -73,8 +73,8 @@ class General: if not os.path.isfile(os.path.join(bin_dir, "resetprop")): if not os.path.exists(bin_dir): os.makedirs(bin_dir) - shutil.copy(os.path.join( - "./bin", self.arch[0], "resetprop"), bin_dir) + shutil.copy(os.path.join(os.path.join(os.path.dirname(__file__), "..", "bin", + self.arch[0], "resetprop")), bin_dir) os.chmod(os.path.join(bin_dir, "resetprop"), 0o755) if not os.path.isfile(os.path.join(bin_dir, "resetprop.sh")): with open(os.path.join(bin_dir, "resetprop.sh"), "w") as f: