How to avoid case mismatch when renaming things?

Godot Version

v4.3.stable.mono.official [77dcf97d8]

Question

I imported an addon that came with a demo scene + files.
I renamed the “demo” folder to “Demo” afterwards in the file system.

EDIT: And how would I fix it (to keep the new case)?

Does Godot not update the file paths when renaming folders?
What would be the “correct” way to rename things if using “right click->rename” causes issues?

drivers/windows/file_access_windows.cpp:181 - Case mismatch opening requested file ‘res://demo/assets/materials/M_rock30_tp.tres’, stored as ‘res://Demo/assets/materials/M_rock30_tp.tres’ in the filesystem. This file will not open when exported to other case-sensitive platforms.

You checked if that path is not hardcoded somewhere in a script?

1 Like

No, I couldn’t find anything.

Does Godot really check if files are somewhere referenced in a script?

If is being used by preload() yes because the path needs to be constant and is checked in editor.

Can you share the demo you download?

It’s the demo that comes with the Terrain3D plugin from the asset library.

I searched with “find in files” for M_rock30 but nothing came up.

I guess it is somewhere referenced as a resource?

I did some test and indeed seems Godot is not renaming the paths correct inside the resources, which is strange because i created a small project and did the same directory rename and in my project uploaded the path inside the files as expected. I’ll test more and if necessary open a bug report on github.

1 Like

Just to add some extra info.
I tried everything and searched for references everywhere and nothing was doing it.

Turns out in my case, the offending thing was a “.meshlib” file.
It was using a texture inside the renamed folder and the warning was only about the texture name being wrong.

So after recreating/updating the meshlib file, the error was gone for me.


Oh yeah, and this renaming bug is fixed on 4.4.beta.
Just tested it right now. No more renaming errors.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.