From 16acb92a450f83c61c301021b922f2c3ee8b147a Mon Sep 17 00:00:00 2001 From: Mika Havela Date: Fri, 1 Feb 2008 13:40:09 +0000 Subject: Chaning the way this lib reports back status git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@674 ab2d0c66-481e-0410-8bed-d214d4d58bed --- lib/validator.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/validator.lua') 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 -- cgit v1.2.3