Now we use the realpath instead of the user provided name
Helps to avoid unpleasant surprises like in the #544 case Closes #544
This commit is contained in:
parent
f28540d9cc
commit
e4614e7603
|
|
@ -443,7 +443,7 @@ def preflight_checks(skip_pre, targets):
|
||||||
|
|
||||||
def get_output_dir(o_dir, obj, dry=False):
|
def get_output_dir(o_dir, obj, dry=False):
|
||||||
# outdir is a combination of the config and output
|
# 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
|
# Create directory if needed
|
||||||
logger.debug("Output destination: {}".format(outdir))
|
logger.debug("Output destination: {}".format(outdir))
|
||||||
if not dry and not os.path.exists(outdir):
|
if not dry and not os.path.exists(outdir):
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,7 @@ class BaseOutput(RegOutput):
|
||||||
def run(self, output_dir):
|
def run(self, output_dir):
|
||||||
self.output_dir = output_dir
|
self.output_dir = output_dir
|
||||||
output = self.options.output if hasattr(self.options, 'output') else ''
|
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
|
# Ensure the destination dir already exists
|
||||||
target_dir = os.path.dirname(os.path.abspath(target))
|
target_dir = os.path.dirname(os.path.abspath(target))
|
||||||
if not os.path.isdir(target_dir):
|
if not os.path.isdir(target_dir):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue