From adda405f8336c81c715deb58338ce8c0ed4d76f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20G=C3=A2teau?= Date: Wed, 30 Jul 2014 15:05:19 +0200 Subject: [PATCH] Do not use os.path.join with entry["destination"] if it starts with a "/" then `destination` will be equal to entry["destination"] --- src/modules/unsquashfs/main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/unsquashfs/main.py b/src/modules/unsquashfs/main.py index 37bb4be51..b5664cb49 100644 --- a/src/modules/unsquashfs/main.py +++ b/src/modules/unsquashfs/main.py @@ -159,8 +159,7 @@ def run(): for entry in job.configuration["unpack"]: source = os.path.abspath(entry["source"]) - destination = os.path.abspath( - os.path.join(root_mount_point, entry["destination"])) + destination = os.path.abspath(root_mount_point + entry["destination"]) if not os.path.isfile(source) or not os.path.isdir(destination): return ("Bad source or destination",