awesomerc: use gmatch instead of deprecated gfind

a user in #awesome made me aware of a little quirk in lib/awful.lua
which renders the history of the prompt unusable when using Gentoo and
installing Lua without the USE-flag "deprecated". Lua states that
string.gfind has been replaced with string.gmatch and aborts the
function prompt_history_save(id). I attached a patch that replaces
id:gfind with id:gmatch, which so far has not revealed any problems.

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Gregor Best 2008-08-30 23:03:36 +02:00 committed by Julien Danjou
parent 1a544726e1
commit 3e325782de
1 changed files with 1 additions and 1 deletions

View File

@ -881,7 +881,7 @@ local function prompt_history_save(id)
local f = io.open(id, "w")
if not f then
local i = 0
for d in id:gfind(".-/") do
for d in id:gmatch(".-/") do
i = i + #d
end
mkdir(id:sub(1, i - 1))