From 6a23b4828fcee75f6078c784612a0a89317f6a96 Mon Sep 17 00:00:00 2001 From: David Hendriks <davidhendriks93@gmail.com> Date: Mon, 29 Mar 2021 16:58:42 +0100 Subject: [PATCH] Fixed all the tmp_dir to be set correctly --- binarycpython/utils/custom_logging_functions.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/binarycpython/utils/custom_logging_functions.py b/binarycpython/utils/custom_logging_functions.py index 218f3ae97..f869835b0 100644 --- a/binarycpython/utils/custom_logging_functions.py +++ b/binarycpython/utils/custom_logging_functions.py @@ -389,13 +389,19 @@ def create_and_load_logging_function( else: tmp_dir = custom_tmp_dir + custom_logging_dir = os.path.join(tmp_dir, 'custom_logging') + + # Create the subdir for the custom_logging code + os.makedirs(custom_logging_dir, exist_ok=True) + + # library_name = os.path.join( - temp_dir(), "libcustom_logging_{}.so".format(uuid.uuid4().hex) + custom_logging_dir, "libcustom_logging_{}.so".format(uuid.uuid4().hex) ) compile_shared_lib( custom_logging_code, - sourcefile_name=os.path.join(temp_dir(), "custom_logging.c"), + sourcefile_name=os.path.join(custom_logging_dir, "custom_logging.c"), outfile_name=library_name, verbose=verbose, ) -- GitLab