diff --git a/target/target.py b/target/target.py index 8b6b0be..327bdae 100644 --- a/target/target.py +++ b/target/target.py @@ -165,9 +165,13 @@ def do_restore(): manifest_file = None if os.path.isdir(remote_dir): - for f in os.listdir(remote_dir): - if f.endswith("_manifest.json"): - manifest_file = os.path.join(remote_dir, f) + # Рекурсивный поиск manifest.json (может быть в подпапках после tar xzf) + for root, _, files in os.walk(remote_dir): + for f in files: + if f.endswith("_manifest.json"): + manifest_file = os.path.join(root, f) + break + if manifest_file: break if not manifest_file: raise RuntimeError("manifest.json не найден в папке архива")