Open Zylann opened 5 years ago
I don't think that it's a bug, considering it's a warning and not an error. Linux's filesystem has case sensitivity. Maybe ignoring case mismatch on Windows would make sense, since it doesn't have case sensitivity, but I feel like that wouldn't be a great idea especially if you're working in a team where other people use Linux.
I am well aware of case difference between OS, but I'm not asking to remove this warning. Read my issue again:
I clicked on the folder icon to pick interaction.gd from the file system
the script already existed and I didn't rename it
somehow Godot tried to open the script using the wrong name.
I told Godot to load interaction.gd
, and it still tried to load Interaction.gd
.
Something definitely went wrong here, and could hide a potential bug :p
At no point in this repro this should have happened, regardless of case sensitivity of the OS.
Maybe the issue title is a bit misleading, since the warning is only a symptom, not the problem.
If you told it to load interaction.gd and not Interaction.gd... I would say it's a bug.
When you clicked on the folder icon to load the script... did you actually click on "interaction.gd" to change the "file value". If you click on it.. it should change it to lowercase, if not, it'll leave the field to uppercase since it autofills with the name of your node.
After testing again, it does replace the line edit with the lowercase version interaction.gd
.
However I noticed that it tried to load Interaction.gd
when the file dialog opens, before I actually select the file...
The error is triggered by the following: https://github.com/codecustard/godot/blob/24e1039eb6fe32115e8d1a62a84965e9be19a2ed/editor/editor_file_dialog.cpp#L255-L256
_request_single_thumbnail(get_current_dir().plus_file(get_current_file()));
eventually checks if file exists, which does the test by opening the file.
Still valid in 3.2.3 rc4 On master when creating script it doesn't have name for some reason, so it's impossible to test.
Still valid in 4.0.2 release.
It seems generates a upper-case naming file and causes Class "Xxx" hides a global script class.
because there are actually 2 files loaded but one is invisible in file system.
Everytime it report case mismatch when I start my project. and I don't know how to fix this.
Godot 3.2 master ccf294b92f02af6e60206e220dcf4a8474f73f0a
I have an existing script named
interaction.gd
and a node calledInteraction
. I used the right-click menu of the scene tree to add that script. The dialog popped up proposing the nameInteraction.gd
. I clicked on the folder icon to pickinteraction.gd
from the file system, then clickedOK
.Later I noticed the following warnings in the console:
Although the script loaded correctly, these warnings seem to hint a problem with this sequence of actions. Case-sensitivity should not matter at all since the script already existed and I didn't rename it. It also happened during file opening, so somehow Godot tried to open the script using the wrong name.