[Bugfix] Path join when building local path for S3 clone (#12353)

Signed-off-by: Omer Dayan (SW-GPU) <omer@run.ai>
This commit is contained in:
omer-dayan 2025-01-24 05:06:07 +02:00 committed by GitHub
parent d3d6bb13fb
commit 5e5630a478
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -145,7 +145,8 @@ class S3Model:
return
for file in files:
destination_file = self.dir + file.removeprefix(base_dir)
destination_file = os.path.join(self.dir,
file.removeprefix(base_dir))
local_dir = Path(destination_file).parent
os.makedirs(local_dir, exist_ok=True)
self.s3.download_file(bucket_name, file, destination_file)