-
Notifications
You must be signed in to change notification settings - Fork 20
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
filesystem.gd returns paths with two forward slashes between directory and file name #63
Comments
Is this causing any issues at the moment or only when you were first trying to do it? |
There aren't any noticeable problems right now. It just causes a hiccup when you try to add/modify anything that uses it. In the case of script templates, I couldn't use |
(Also to be clear res/user is supposed to be a double slash). |
The extra slash you added when you were saving the WATTemplate was redundant since the script_templates directory ends with a forward slash. |
Okay. This is actually weird as hell. It shows differently from the print and the slash. |
Okay found the issue. You had placed a leading underscore at the wat_templates_dir string. So when you passed that directory to the filesystem.list method, then filesystem was adding an additional slash on top of the one you gave. |
Ah ok. That sort of explains the crash, the scene was looking for a path that didn't exist? I'm not entirely sure. |
Yeah the crash was the scene trying to look for testdirectorytestscript rather than testdirectory/testscript |
Description
When
filesystem._list
is called, the paths that it returns are likeres://path/to//filename.gd
. This caused a few problems when I tried to load the templates to copy them.Possible Fix
In
filesystem.gd
at line 27 -here, the
/
between the two%s
could be removed, but when I tried that,WAT.tscn
kept causing the editor to crash and the error message indicated cyclic reference.The crashes happened if the addon was enabled, if the scene was opened or if the scene was run (in this case, only the preview window crashed).
The text was updated successfully, but these errors were encountered: