From 441dafb702149f5728c2c6736fc08741a46deb26 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Thu, 22 Apr 2021 23:31:22 -0700 Subject: [PATCH] Use cwd for getting the absolute path Sometimes, directories adjacent to yarGen.py are unwritable (e.g. in the case of being installed to the Nix store). Instead, read from the current directory. --- yarGen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarGen.py b/yarGen.py index a76dc2d..bfb9077 100644 --- a/yarGen.py +++ b/yarGen.py @@ -84,7 +84,7 @@ def get_abs_path(filename): - return os.path.join(os.path.dirname(os.path.abspath(__file__)), filename) + return os.path.join(os.getcwd(), filename) def get_files(dir, notRecursive):