configmanager: resolve_relative_path: Improved detection of absolute paths on Windows.
authorWaqas Hussain <waqas20@gmail.com>
Thu, 25 Aug 2011 12:07:36 +0500
changeset 4358 86be454168fb
parent 4357 d6928b78c548
child 4359 c69cbac4178f
configmanager: resolve_relative_path: Improved detection of absolute paths on Windows.
core/configmanager.lua
--- a/core/configmanager.lua	Thu Aug 25 12:05:27 2011 +0500
+++ b/core/configmanager.lua	Thu Aug 25 12:07:36 2011 +0500
@@ -88,7 +88,7 @@
 			local is_relative;
 			if path_sep == "/" and path:sub(1,1) ~= "/" then
 				is_relative = true;
-			elseif path_sep == "\\" and (path:sub(1,1) ~= "/" and path:sub(2,3) ~= ":\\") then
+			elseif path_sep == "\\" and (path:sub(1,1) ~= "/" and (path:sub(2,3) ~= ":\\" or path:sub(2,3) ~= ":/")) then
 				is_relative = true;
 			end
 			if is_relative then