Skip to content

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

@vgezer

Description

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.

Activity

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions