diff --git a/file.lua b/file.lua index 257f346..48adc66 100644 --- a/file.lua +++ b/file.lua @@ -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 diff --git a/minetest/media.lua b/minetest/media.lua index 06a3fb2..e3acfb2 100644 --- a/minetest/media.lua +++ b/minetest/media.lua @@ -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