summaryrefslogtreecommitdiffstats
path: root/lib/validator.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lib/validator.lua')
-rwxr-xr-xlib/validator.lua5
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