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

[Web] Cannot remove files with DirAccess.remove_absolute #100217

Closed
vgezer opened this issue Dec 9, 2024 · 2 comments · Fixed by #100221
Closed

[Web] Cannot remove files with DirAccess.remove_absolute #100217

vgezer opened this issue Dec 9, 2024 · 2 comments · Fixed by #100221

Comments

@vgezer
Copy link
Contributor

vgezer commented Dec 9, 2024

Tested versions

Reproducible: 4.4.dev5 and 4.4dev6

System information

Godot v4.4.dev6 - Windows 10.0.22631 - Multi-window, 2 monitors - OpenGL 3 (Compatibility) - NVIDIA GeForce RTX 3060 Laptop GPU (NVIDIA; 32.0.15.6603) - 12th Gen Intel(R) Core(TM) i5-12500H (16 threads)

Issue description

On the exported project, I am creating a file in user:// folder, then letting users remove it. DirAccess.remove_absolute(filepath) returns 0 (successful), but after restarting the scene Ctrl + Refresh, the file is seen there again.

Steps to reproduce

List folders in user://, if empty create a file there.

Delete using DirAccess.remove_absolute("user://filename").
Restart the game via refresh button on the browser.

Listing folder: user://
test.js:459 ["text.txt"]
test.js:459 File stored at: user://text.txt
test.js:459 Listing folder: user://
test.js:459 ["text.txt"]
test.js:459 Deleting: user://text.txt
test.js:459 Deleted user://text.txt
test.js:459 Listing folder: user://
test.js:459 []

After refreshing,

Listing folder: user://
test.js:459 ["text.txt"]`

The text.txt is still there.

Minimal reproduction project (MRP)

testbug.zip

Export as web and launch it. Check the Dev Console.

@adamscott adamscott changed the title Exports on web cannot remove files with remove_absolute [Web] Cannot remove files with DirAccess.remove_absolute Dec 9, 2024
@adamscott
Copy link
Member

Thanks for the super well made MRP, it was super useful.

@vgezer
Copy link
Contributor Author

vgezer commented Dec 9, 2024

Thanks for the super well made MRP, it was super useful.

Thanks for the quick fix.

@akien-mga akien-mga added this to the 4.4 milestone Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants