mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-22 07:13:45 +01:00
Rename split_extension to get_extension
This commit is contained in:
parent
1d7e893f13
commit
9484b78eef
2
file.lua
2
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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user