From 9484b78eef4c565544d39a594c755ee9f9637f67 Mon Sep 17 00:00:00 2001 From: Lars Mueller Date: Wed, 1 Sep 2021 17:09:14 +0200 Subject: [PATCH] Rename split_extension to get_extension --- file.lua | 2 +- minetest/media.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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