mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-26 01:03:46 +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 = {}
|
local _ENV = {}
|
||||||
setfenv(1, _ENV)
|
setfenv(1, _ENV)
|
||||||
|
|
||||||
function split_extension(filename)
|
function get_extension(filename)
|
||||||
return filename:match"(.*)%.(.*)$"
|
return filename:match"(.*)%.(.*)$"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ local function collect_media(modname)
|
|||||||
local function traverse(folder)
|
local function traverse(folder)
|
||||||
local filenames = minetest.get_dir_list(folder, false)
|
local filenames = minetest.get_dir_list(folder, false)
|
||||||
for _, filename in pairs(filenames) do
|
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
|
if media_extensions[ext] then
|
||||||
media[filename] = folder .. "/" .. filename
|
media[filename] = folder .. "/" .. filename
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user