Skip to content
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

Moving file referenced in resources generates .depren files #96687

Open
4X3L82 opened this issue Sep 7, 2024 · 1 comment
Open

Moving file referenced in resources generates .depren files #96687

4X3L82 opened this issue Sep 7, 2024 · 1 comment

Comments

@4X3L82
Copy link

4X3L82 commented Sep 7, 2024

Tested versions

Reproducible in:

  • 4.2.1 (although it complains when moving the file, still makes the same depren file)
  • 4.3-stable
  • 4.4-dev1

The message from 4.2.1:
image

4.3 & 4.4 are silent.

System information

Godot v4.4.dev1 - Manjaro Linux #1 SMP PREEMPT_DYNAMIC Mon Aug 19 09:51:26 UTC 2024 - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3080 Laptop GPU - AMD Ryzen 9 5900HX with Radeon Graphics (16 Threads)

Issue description

When moving files around that are part of a resource, Godot creates an extra .depren file.
Deleting this file doesn't seem to do/break anything? I think if this is part of some internal process for moving files, that it didn't clean up after itself.

It seems that this bug is back?

Steps to reproduce

  • Create a New Resource, select Sprites Frames
  • Add frames using icon.svg
  • Save the resource as icon.res
  • Move icon.svg to a different directory
  • Using the file explorer to check the root directory of the project, extra file appeared: icon.res.depren

Deleting this file seems to have no effect on the project.

Minimal reproduction project (MRP)

Open this project in Godot: depren.zip

In the editor, select the icon.svg and drag it into the asset directory.
Open your file explorer and the root of the project now has an extra file: icon.res.depren

@DHNebula
Copy link

DHNebula commented Sep 7, 2024

I've been able to reproduce the issue on my end, and the issue seems to be in resource_format_binary.cpp. It's reaching this section of ResourceFormatLoaderBinary::rename_dependencies in the debugger:

if (da->exists(p_path + ".depren")) {
	da->remove(p_path);
	da->rename(p_path + ".depren", p_path);
}

I've not been able to figure out why, but the first line of the if is returning false even though the file exists, meaning it never gets around to cleaning up the files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants