-
Notifications
You must be signed in to change notification settings - Fork 117
Open
Description
tk-core/python/tank/util/zip.py
Lines 50 to 63 in b105eb0
# - if the zip contains a single folder with all content inside, | |
# assume the bundle is contained inside this structure. This is | |
# a common scenario if a user has created a zip by right clicking on it | |
# and selected 'create archive' or 'send to zip'. | |
# compute number of unique root folders | |
# note: zip module uses forward slash on all operating systems | |
root_items = set( | |
[item.split("/")[0] for item in zip_obj.namelist() if "/" in item] | |
) | |
# remove certain system items | |
root_items -= SYSTEM_FILE_ITEMS | |
if len(root_items) == 1: |
If the toolkit bundle zip has only a single folder, then it unpacks that folder as the bundle, not the root of the zip.
This works for most packages, but for tk-multi-setframerange, this causes only the hooks folder being unpacked.
Suggested fix : Check for info.yml in the root folder as this is a clear indication of a shotgrid toolkit bundle.
Or check that if there is only a single folder, that there are no files in the root folder.
Metadata
Metadata
Assignees
Labels
No labels