diff options
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/validator.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/validator.lua b/lib/validator.lua index a008397..f75be3a 100755 --- a/lib/validator.lua +++ b/lib/validator.lua @@ -189,9 +189,8 @@ end function is_valid_filename ( path, restriction ) if not (path) or ((restriction) and (string.find (path, "^" .. restriction ) == nil)) then - return nil, validator.msg.err.FileInvalidPath[lang.Current] .. "\n" .. - " * " .. validator.msg.err.FileInvalidPath1[lang.Current] ..":" .. string.format(path) .. "\n * ".. + return false, "* " .. validator.msg.err.FileInvalidPath1[lang.Current] ..":" .. string.format(path) .. "\n* ".. validator.msg.err.FileInvalidPath2[lang.Current] .. ":" .. string.format(restriction) end - return path + return true, path end |