Do not use os.path.join with entry["destination"]
if it starts with a "/" then `destination` will be equal to entry["destination"]
This commit is contained in:
parent
ecb16dcdca
commit
adda405f83
@ -159,8 +159,7 @@ def run():
|
|||||||
|
|
||||||
for entry in job.configuration["unpack"]:
|
for entry in job.configuration["unpack"]:
|
||||||
source = os.path.abspath(entry["source"])
|
source = os.path.abspath(entry["source"])
|
||||||
destination = os.path.abspath(
|
destination = os.path.abspath(root_mount_point + entry["destination"])
|
||||||
os.path.join(root_mount_point, entry["destination"]))
|
|
||||||
|
|
||||||
if not os.path.isfile(source) or not os.path.isdir(destination):
|
if not os.path.isfile(source) or not os.path.isdir(destination):
|
||||||
return ("Bad source or destination",
|
return ("Bad source or destination",
|
||||||
|
Loading…
Reference in New Issue
Block a user