# HG changeset patch # User Matthew Wild # Date 1278547900 -3600 # Node ID df181dcc02b790f516fa96891b0188438689fb4d # Parent 16d59655c817bd82a53a9c8ccbb98dab17441471 make_squishy: Fix traceback when file doesn't contain any path component diff -r 16d59655c817 -r df181dcc02b7 make_squishy --- 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