Don't prepend meshdir to asset paths in MjSpec.to_zip.
PiperOrigin-RevId: 806287351 Change-Id: I9afc8251f9cbced9ecd370b39cec6aeff424514b
This commit is contained in:
committed by
Copybara-Service
parent
7e048b7535
commit
2287b9f815
@@ -105,7 +105,7 @@ def to_zip(spec: _specs.MjSpec, file: Union[str, IO[bytes]]) -> None:
|
||||
file = open(file, 'wb')
|
||||
with zipfile.ZipFile(file, 'w') as zip_file:
|
||||
for filename, contents in files_to_zip.items():
|
||||
zip_info = zipfile.ZipInfo(os.path.join(spec.meshdir, filename))
|
||||
zip_info = zipfile.ZipInfo(filename)
|
||||
zip_file.writestr(zip_info, contents)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user