Closed Jack-023 closed 2 months ago
It only happens with #33
And it is caused by directory_copy_recursively()
just blindly including any path with occurrence of "addons"(which works well if .plugged
are not installed in res://addons
). So for case of #33, every files will be included, since the addons are installed under res://addons
.
Is it a bug in the way the paths are being constructed? I am finding that function a bit difficult to grok so I don't really understand where the problem is being introduced. If I understand correctly, the include
option accepts the paths in the plugin repo that should be copied to the projects' res://addons
directory.
Are you saying that the path filters in includes
are being applied to the project root, rather than the addon's root?
It is because directory_copy_recursively()
always handling absolute path, for example, res://addons/gd-plug/.plugged/godot-ldtk-importer/.git
. Since #33 move all plugins to addons
directory, so the check for addons/
is always true, which means all files will be included.
I have updated the directory_copy_recursively()
function in #33 to use the full path of the include/exclude directories which seems to have fixed the issue.
When I run
godot --headless -s plug.gd install
, gdplug is attempting to download files outside theaddons/
directory of various repos when I am not including the"include"
setting, and when I am attempting to manually set it to"addons/"
. I have changed the default plugged directory tores://addons/gd-plug/.plugged
as mentioned in other issues but otherwise my gd-plug setup is pretty basic. Here are some examples of the behavior I am seeing.Fortunately it runs in safe mode by default I am just getting spammed with warnings but with --force passed it breaks the project repo since all the git files get replaced.