diff --git a/kibot/kiplot.py b/kibot/kiplot.py index b6cb54a6..74f2c0d7 100644 --- a/kibot/kiplot.py +++ b/kibot/kiplot.py @@ -443,7 +443,7 @@ def preflight_checks(skip_pre, targets): def get_output_dir(o_dir, obj, dry=False): # outdir is a combination of the config and output - outdir = os.path.abspath(obj.expand_dirname(os.path.join(GS.out_dir, o_dir))) + outdir = os.path.realpath(os.path.abspath(obj.expand_dirname(os.path.join(GS.out_dir, o_dir)))) # Create directory if needed logger.debug("Output destination: {}".format(outdir)) if not dry and not os.path.exists(outdir): diff --git a/kibot/out_base.py b/kibot/out_base.py index cefc5fe4..f1f237ce 100644 --- a/kibot/out_base.py +++ b/kibot/out_base.py @@ -194,7 +194,7 @@ class BaseOutput(RegOutput): def run(self, output_dir): self.output_dir = output_dir output = self.options.output if hasattr(self.options, 'output') else '' - target = self.expand_filename(output_dir, output) + target = os.path.realpath(self.expand_filename(output_dir, output)) # Ensure the destination dir already exists target_dir = os.path.dirname(os.path.abspath(target)) if not os.path.isdir(target_dir):