diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index 90c258cd7..940f9152a 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -330,8 +330,7 @@ def run(): supported_filesystems = get_supported_filesystems() - unpack = list() - + # Bail out before we start when there are obvious problems for entry in job.configuration["unpack"]: source = os.path.abspath(entry["source"]) sourcefs = entry["sourcefs"] @@ -340,14 +339,18 @@ def run(): utils.warning("The filesystem for \"{}\" ({}) is not supported".format(source, sourcefs)) return (_("Bad unsquash configuration"), _("The filesystem for \"{}\" ({}) is not supported").format(source, sourcefs)) - - destination = os.path.abspath(root_mount_point + entry["destination"]) - if not os.path.exists(source): utils.warning("The source filesystem \"{}\" does not exist".format(source)) return (_("Bad unsquash configuration"), _("The source filesystem \"{}\" does not exist").format(source)) + unpack = list() + + for entry in job.configuration["unpack"]: + source = os.path.abspath(entry["source"]) + sourcefs = entry["sourcefs"] + destination = os.path.abspath(root_mount_point + entry["destination"]) + if not os.path.isdir(destination): utils.warning(("The destination \"{}\" in the target system is not a directory").format(destination)) return (_("Bad unsquash configuration"),