Rename split_extension to get_extension

This commit is contained in:
Lars Mueller 2021-09-01 17:09:14 +02:00
parent 1d7e893f13
commit 9484b78eef
2 changed files with 2 additions and 2 deletions

@ -5,7 +5,7 @@ local io, minetest, modlib, string = io, minetest, modlib, string
local _ENV = {}
setfenv(1, _ENV)
function split_extension(filename)
function get_extension(filename)
return filename:match"(.*)%.(.*)$"
end

@ -24,7 +24,7 @@ local function collect_media(modname)
local function traverse(folder)
local filenames = minetest.get_dir_list(folder, false)
for _, filename in pairs(filenames) do
local _, ext = modlib.file.split_extension(filename)
local _, ext = modlib.file.get_extension(filename)
if media_extensions[ext] then
media[filename] = folder .. "/" .. filename
end