Thu, 08 Jul 2010 01:11:40 +0100
make_squishy: Fix traceback when file doesn't contain any path component
make_squishy | file | annotate | diff | comparison | revisions |
--- a/make_squishy Thu Jul 08 01:11:12 2010 +0100 +++ b/make_squishy Thu Jul 08 01:11:40 2010 +0100 @@ -61,7 +61,7 @@ local LUA_DIRSEP = package.config:sub(1,1); local LUA_PATH_MARK = package.config:sub(5,5); -local base_path = files[1]:match("^(.-)"..LUA_DIRSEP.."[^"..LUA_DIRSEP.."]*$").."/"; +local base_path = (files[1]:match("^(.-)"..LUA_DIRSEP.."[^"..LUA_DIRSEP.."]*$") or ".").."/"; local package_path = package.path:gsub("[^;]+", function (path) if not path:match("^%"..LUA_DIRSEP) then