diff --git a/main.py b/main.py index 1725e8d..3fa7934 100644 --- a/main.py +++ b/main.py @@ -300,7 +300,9 @@ def replication(bnd_name: str, commit_id: str, schema: str): 'bucket': x.bucket, 'filename': x.fileName, }) - download_file(x.key, x.bucket, os.path.join(z.dirname, x.key)) + fp = os.path.join(z.dirname, x.key) + os.makedirs(os.path.dirname(fp), exist_ok=True) + download_file(x.key, x.bucket, fp) with open(os.path.join(z.dirname, 'export_files.json'), 'w') as f: f.write(json.dumps(exported_files)) ws.clearData(True)