aboutsummaryrefslogtreecommitdiff
path: root/drivers/unix/dir_access_unix.cpp
diff options
context:
space:
mode:
authorZher Huei Lee2016-03-01 10:40:31 +0000
committerRémi Verschelde2016-03-05 13:35:48 +0100
commitc850fa73316a2f4905e9d250f7966c82e74e208f (patch)
tree67a39c0aa059183fdbfb1d6a9d490dac6ca590ee /drivers/unix/dir_access_unix.cpp
parentafd75013f9349240ab0899ba7e2a5e8f0eed8929 (diff)
downloadgodot-c850fa73316a2f4905e9d250f7966c82e74e208f.tar.gz
godot-c850fa73316a2f4905e9d250f7966c82e74e208f.tar.zst
godot-c850fa73316a2f4905e9d250f7966c82e74e208f.zip
Diffstat (limited to 'drivers/unix/dir_access_unix.cpp')
-rw-r--r--drivers/unix/dir_access_unix.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/unix/dir_access_unix.cpp b/drivers/unix/dir_access_unix.cpp
index 23a63be33..8b097ad25 100644
--- a/drivers/unix/dir_access_unix.cpp
+++ b/drivers/unix/dir_access_unix.cpp
@@ -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;