diff mod_register_web/mod_register_web.lua @ 1459:742f3dc601b5

mod_register_web: Use path separator from package.config
author Kim Alvefur <zash@zash.se>
date Fri, 27 Jun 2014 20:57:51 +0200
parents e670d4cc5027
children 5e1f7af23cf0
line wrap: on
line diff
--- a/mod_register_web/mod_register_web.lua	Thu Jun 26 19:41:32 2014 +0200
+++ b/mod_register_web/mod_register_web.lua	Fri Jun 27 20:57:51 2014 +0200
@@ -2,6 +2,7 @@
 local nodeprep = require "util.encodings".stringprep.nodeprep;
 local usermanager = require "core.usermanager";
 local http = require "net.http";
+local path_sep = package.config:sub(1,1);
 
 local extra_fields = {
 	nick = true; name = true; first = true; last = true; email = true;
@@ -15,7 +16,7 @@
 end
 
 local function get_template(name)
-	local fh = assert(module:load_resource("templates/"..name..".html"));
+	local fh = assert(module:load_resource("templates"..path_sep..name..".html"));
 	local data = assert(fh:read("*a"));
 	fh:close();
 	return template(data);