WIP: Auios' version - Do not merge. Only here for comparison #9

Draft
Auios wants to merge 28 commits from Auios/BlockLua:master into master
Showing only changes of commit 33f5ec9bbe - Show all commits

View File

@@ -62,6 +62,9 @@ local disallowed_exts = tmap {
-- Return: clean file path if allowed (or nil if disallowed),
-- error string (or nil if allowed)
local function safe_path(fn, readonly)
if type(fn) ~= 'string' then
return nil, 'Filename must be a string'
end
fn = fn:gsub('\\', '/')
fn = fn:gsub('^ +', '')
fn = fn:gsub(' +$', '')