Open fwild opened 1 year ago
The problem is in the way we store the models. Right now the identifier is the model name, and if we try to download one model named "Microscope" and then try to download another model with the same name "MicroScope" this will lead to the fact that we will store the second model data and the archive of the first, which leads us to an error when trying to unarchive the archive. instead of the name as an identifier you should use the uid of the object.
Moreover: currently there is not way to 'flush' the download folder - the only way to clean up space is to uninstall the app. This needs remediation.
The problem is in the way we store the models. Right now the identifier is the model name, and if we try to download one model named "Microscope" and then try to download another model with the same name "MicroScope" this will lead to the fact that we will store the second model data and the archive of the first, which leads us to an error when trying to unarchive the archive.
We have some strange logic in the code:
The error thrown is from the archive which we have created ourselves:
Solution:
This is the relevant code: