You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linux Mint 20.3, i7 9th Gen, NVIDIA GeForce GTX 1650, Vulkan
Issue description
I am using OS.move_to_trash("abcd.txt") in a script. The file abcd.txt does not exist. We expect an error like "File not found" or "File does not exist". Instead the error message displayed is _ready: Can't rename file "abcd.txt" to "/abcd.txt".
Steps to reproduce
Use the following _ready function in a GDScript file and let it run.
func _ready():
OS.move_to_trash("abcd.txt")
If the file abcd.txt exists, then the code will work as expected.
If the file abcd.txt does not exist, then this error will appear _ready: Can't rename file "abcd.txt" to "/abcd.txt".
The problem seems to originate in the file os_linuxbsd.cpp, in the function OS_LinuxBSD::move_to_trash.
In line no 624, execute("gio", args, nullptr, &err_code); returns with err_code value 1 if the file to be deleted does not exist.
But the existing code checks for err_code == 2 to determine if the file to be deleted does not exist. (line no 625)
The same is repeated for execute("kioclient5", args, nullptr, &err_code); and execute("gvfs-trash", args, nullptr, &err_code);
It would be nice if someone with a KDE system could test the bug.
(I mean test it on one of the following OS's : lUbubtu, MXLinux, KDE Linux, etc)
Thanks.
Godot version
4.0 beta 2
System information
Linux Mint 20.3, i7 9th Gen, NVIDIA GeForce GTX 1650, Vulkan
Issue description
I am using
OS.move_to_trash("abcd.txt")
in a script. The file abcd.txt does not exist. We expect an error like "File not found" or "File does not exist". Instead the error message displayed is_ready: Can't rename file "abcd.txt" to "/abcd.txt"
.Steps to reproduce
Use the following _ready function in a GDScript file and let it run.
If the file abcd.txt exists, then the code will work as expected.
If the file abcd.txt does not exist, then this error will appear
_ready: Can't rename file "abcd.txt" to "/abcd.txt"
.Minimal reproduction project
WrongErrorMsg.zip
Bugsquad edit (keywords for easier searching): move_to_trash
The text was updated successfully, but these errors were encountered: