Skip to content

the addon should update only when changes happens in the addons folder #21

@WhalesState

Description

@WhalesState

We are listing the addons directory and running a while loop to get each folder and we check if it has a plugin.cfg file and we update the options button and we save cfg file

the problem is, FileSystem emits filesystem_changed whenever any file changes like when you save your project or importing assets .. etc, we need to make it only check if the changes happens inside the addons folder.

i was thinking about many ways , to check if files size changed ? last modified date ?

then how ?

the only way i can find since directories don't have last modified date is that we list the addons directory and we check the names of the folders if it doesn't exist in our plugins dictionary then we refresh, if the folders are the same, then we return.

this will produce only one issue, if someone removed an addon folder from the OS filesystem and added another folder with the same name but different contents and returned back to godot. because godot will not emit the signal until the user focus the godot window. and the while loop will not recognize any changes so it will keep the old addon information.

if we made this enhancement then we should add this as a warning in the README file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions