Changeset

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 1458:e9d164e694e7
children 1460:5e1f7af23cf0
files mod_register_web/mod_register_web.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
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);