mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 08:23:29 +00:00
Added relative paths for DirAccess::remove()
Follows similar behaviour to DirAccess::rename()
This commit is contained in:
parent
c0382a1731
commit
d7052ddba3
4 changed files with 17 additions and 8 deletions
|
@ -292,8 +292,11 @@ Error DirAccessUnix::rename(String p_path,String p_new_path) {
|
|||
}
|
||||
Error DirAccessUnix::remove(String p_path) {
|
||||
|
||||
p_path=fix_path(p_path);
|
||||
|
||||
if (p_path.is_rel_path())
|
||||
p_path=get_current_dir().plus_file(p_path);
|
||||
else
|
||||
p_path=fix_path(p_path);
|
||||
|
||||
struct stat flags;
|
||||
if ((stat(p_path.utf8().get_data(),&flags)!=0))
|
||||
return FAILED;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue