mod - auth_rx : check if file exits before write
* backported from 48737b82a1
This commit is contained in:
parent
a7f5226332
commit
f1889bbcfc
@ -486,10 +486,10 @@ function AuthFilter( path, name, debug )
|
||||
local file = io.open( path .. "/" .. name, "r" )
|
||||
if not file then
|
||||
file = io.open( path .. "/" .. name, "w+")
|
||||
file:write("pass now")
|
||||
if not file then
|
||||
error( "The specified ruleset file does not exist." )
|
||||
end
|
||||
file:write("pass now")
|
||||
file:close( file )
|
||||
file = io.open( path .. "/" .. name, "r" )
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user