Print paths as absolute
authorpiegames <git@piegames.de>
Mon, 21 Jun 2021 20:31:51 +0000 (22:31 +0200)
committerpiegames <git@piegames.de>
Mon, 21 Jun 2021 20:31:53 +0000 (22:31 +0200)
This generally makes debugging path issues easier.

sbysrc/sby.py
sbysrc/sby_core.py

index 2ed7e68d68be1cac28b0b89bf3fc7f57b25fbc4b..ceacdf11f53e0af110cddedc7990a2d42f31fcab 100644 (file)
@@ -345,7 +345,7 @@ def run_job(taskname):
             shutil.move(my_workdir, "{}.bak{:03d}".format(my_workdir, backup_idx))
 
         if opt_force and not reusedir:
-            early_log(my_workdir, "Removing directory '{}'.".format(my_workdir))
+            early_log(my_workdir, "Removing directory '{}'.".format(os.path.abspath(my_workdir)))
             if sbyfile:
                 shutil.rmtree(my_workdir, ignore_errors=True)
 
index eac1bfddb7f3d0f05a5469d01cf5ff6eb0390ae0..d5d818484b1303edc5bb6722533424bdfc878156 100644 (file)
@@ -331,7 +331,7 @@ class SbyJob:
             if basedir != "" and not os.path.exists(basedir):
                 os.makedirs(basedir)
 
-            self.log("Copy '{}' to '{}'.".format(srcfile, dstfile))
+            self.log("Copy '{}' to '{}'.".format(os.path.abspath(srcfile), os.path.abspath(dstfile)))
             copyfile(srcfile, dstfile)
 
     def handle_str_option(self, option_name, default_value):