-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uninstalling (or updating) an extensions that has subdirectories results in an error #3385
Comments
Thanks for this report @thkwznk. The closest attempt to reproduce this bug was when I added an additional folder inside an already installed extension folder, and then I tried to uninstall it. This makes me think that if an extension is capable of saving files inside the folder of the same extension, at the moment of uninstalling it -if it is not informed in "__info.json"- Aseprite will not be able to remove it.
|
If I remember correctly the uninstalling logic of extension will try to delete all files from the __info.json file, but in that file directories are not listed, so yes, if there is a subdirectory in the extension, the files will be deleted but then the subdir will not. So I think there is a bug there 👍 |
To stay on the same page: I guess the correct behavior is:
@dacap correct me or add a comment if I'm wrong. |
There shouldn't be any new alert. It's only a thing of deleting subdirectories after deleting all files listed in __info.json (when the files are being deleted, we can create a list of subdirectories, and then delete them). |
This addition is needed in issue aseprite/aseprite#3385
This addition is needed on issue aseprite/aseprite#3385
…results in an error (fix #3385) Prior to this fix, any additional external files or directories within the Extension's directory tree, break the subdirectory removal iteration, resulting in empty subdirectories and a console error.
…results in an error (fix #3385) Prior to this fix, any additional external files or directories within the Extension's directory tree, break the subdirectory removal iteration, resulting in empty subdirectories and a console error.
In the past I think I was able to reproduce the problem without adding new files/subdirs manually after the installation. Now it looks like I cannot reproduce it, the only way to reproduce it is just adding new files/subdirs manually. In case someone has a test package to reproduce this with Install/Update without touching the installed folder manually, it would be great to attach it to a post here. |
I just tried with extensions that produced this issue for me but all of them work correctly now in v1.2.39 and v1.3-beta20. |
I share the link to download the extension that I was testing to reproduce this error: https://community.aseprite.org/t/extension-animation-suite/13322 (nice extension @thkwznk 😄). |
@dacap something is to be fixed here? As I said in the first reply:
But I found that if there is a new external folder present, the deletion of the directories will not complete (leaving empty folders as I said here). I think this PR solve this case as much as possible (leaving only the external folders intact). |
I was able to reproduce it creating new empty dirs. And the PR fixes the error message, I think that is enough. |
…results in an error (fix #3385) Prior to this fix, any additional external files or directories within the Extension's directory tree, break the subdirectory removal iteration, resulting in empty subdirectories and a console error.
…results in an error (fix #3385) Prior to this fix, any additional external files or directories within the Extension's directory tree, break the subdirectory removal iteration, resulting in empty subdirectories and a console error.
Uninstalling (or updating, I'm guessing it's an uninstall+install combo action) an extension that has subdirectories in its directory results in an error shown below.
It leaves the extension directory with empty subdirectories, there are zero files left.
Aseprite and System version
The text was updated successfully, but these errors were encountered: