diff options
author | Matthew Wild <mwild1@gmail.com> | 2011-04-05 14:11:25 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2011-04-05 14:11:25 +0100 |
commit | 667fc392e957df71290b5b36f86e964ac939fd5e (patch) | |
tree | 1b37d10fc312a2db099b75077383b59783b18400 /tools/migration/migrator | |
parent | ca74173a8221e9cd93db30c7bb89c8b181f8b60b (diff) | |
download | prosody-667fc392e957df71290b5b36f86e964ac939fd5e.tar.gz prosody-667fc392e957df71290b5b36f86e964ac939fd5e.zip |
tools/migration: Support for ~/ in paths
Diffstat (limited to 'tools/migration/migrator')
-rw-r--r-- | tools/migration/migrator/prosody_files.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/migration/migrator/prosody_files.lua b/tools/migration/migrator/prosody_files.lua index 0a610d0e..fe48e7a4 100644 --- a/tools/migration/migrator/prosody_files.lua +++ b/tools/migration/migrator/prosody_files.lua @@ -22,7 +22,7 @@ module "prosody_files" 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("//+", "/"); + 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 }); |