diff prosody @ 3402:dfc369314e53

prosody.resolve_relative_path: Updated to take a parent path to resolve against.
author Waqas Hussain <waqas20@gmail.com>
date Fri, 23 Jul 2010 23:14:50 +0500
parents b4ebda3fd6e9
children 7d34bcbf104c
line wrap: on
line diff
--- a/prosody	Fri Jul 23 23:09:58 2010 +0500
+++ b/prosody	Fri Jul 23 23:14:50 2010 +0500
@@ -165,7 +165,7 @@
 	
 	local path_sep = package.config:sub(1,1);
 	local rel_path_start = ".."..path_sep;
-	function prosody.resolve_relative_path(path)
+	function prosody.resolve_relative_path(parent_path, path)
 		if path then
 			local is_relative;
 			if path_sep == "/" and path:sub(1,1) ~= "/" then
@@ -174,7 +174,7 @@
 				is_relative = true;
 			end
 			if is_relative then
-				return CFG_CONFIGDIR..path_sep..path;
+				return parent_path..path_sep..path;
 			end
 		end
 		return path;