godotengine / godotengine/godot
resource icon is not shown when saving it with custom extension
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
v4.3.beta1.mono.official [a4f2ea91a]
### System information
Windows 11
### Issue description
I build my custom resource loader and saver to have a custom extension.
When I now save my resource by the custom extension, the resource icon is not shown in the filesystem.

### Steps to reproduce
Use the attached project and create a new resource from the `GeometryNodeGraphResource`

- do save as `graph.npgh`

- do save as `graph.tres`
You can see the icon is only shown for the *.tres extension.

## Additional Info
On v4.2.2.stable.official [15073afe3] the custom resource load save is completely broken :(

### Minimal reproduction project (MRP)
[fileicon.zip](https://github.com/user-attachments/files/15910660/fileicon.zip)
Contributor guide
Research direction
Start with the attached fileicon.zip minimal reproduction project and reproduce saving GeometryNodeGraphResource as graph.npgh versus graph.tres on Windows. Trace the editor filesystem icon handling for custom resource extensions; done means the custom-extension resource shows the same icon as the corresponding .tres resource without regressing custom resource loading and saving.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100