Software /
code /
prosody
Changeset
4241:49b9e73e31ef 0.8.0
tools/migration/migrator/prosody_files.lua: Fix for previous commit
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 05 Apr 2011 14:34:48 +0100 |
parents | 4240:b3d9063aad4d |
children | 4242:fad4a24f10bc |
files | tools/migration/migrator/prosody_files.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/migration/migrator/prosody_files.lua Tue Apr 05 14:34:06 2011 +0100 +++ b/tools/migration/migrator/prosody_files.lua Tue Apr 05 14:34:48 2011 +0100 @@ -13,6 +13,7 @@ local next = next; local pairs = pairs; local json = require "util.json"; +local os_getenv = os.getenv; prosody = {}; local dm = require "util.datamanager" @@ -22,7 +23,7 @@ local function is_dir(path) return lfs.attributes(path, "mode") == "directory"; end local function is_file(path) return lfs.attributes(path, "mode") == "file"; end local function clean_path(path) - return path:gsub("\\", "/"):gsub("//+", "/"):gsub("^~", os.getenv("HOME") or "~"); + return path:gsub("\\", "/"):gsub("//+", "/"):gsub("^~", os_getenv("HOME") or "~"); end local encode, decode; do local urlcodes = setmetatable({}, { __index = function (t, k) t[k] = char(tonumber("0x"..k)); return t[k]; end });