From d7052ddba334de3df1190837c6d8589b48799965 Mon Sep 17 00:00:00 2001
From: Zher Huei Lee <lee.zh.92@gmail.com>
Date: Tue, 1 Mar 2016 10:40:31 +0000
Subject: Added relative paths for DirAccess::remove()

Follows similar behaviour to DirAccess::rename()
---
 drivers/windows/dir_access_windows.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

(limited to 'drivers/windows')

diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp
index 0a413979fc..b9476b870b 100644
--- a/drivers/windows/dir_access_windows.cpp
+++ b/drivers/windows/dir_access_windows.cpp
@@ -310,8 +310,11 @@ Error DirAccessWindows::rename(String p_path,String p_new_path) {
 
 Error DirAccessWindows::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);
+
 	printf("erasing %s\n",p_path.utf8().get_data());
 	//WIN32_FILE_ATTRIBUTE_DATA    fileInfo;
 	//DWORD fileAttr = GetFileAttributesExW(p_path.c_str(), GetFileExInfoStandard, &fileInfo);
-- 
cgit v1.2.3