refactor: don't overwrite default libraries and expose join_path() and path_separator() types

This commit is contained in:
tomasklaen
2022-10-31 09:43:18 +01:00
parent d9e5853542
commit e8060c74ad
3 changed files with 15 additions and 15 deletions

View File

@@ -186,7 +186,7 @@ function open_file_navigation_menu(directory_path, handle_select, opts)
local path_separator = path_separator(directory.path)
for _, dir in ipairs(directories) do
local serialized = serialize_path(utils.join_path(directory.path, dir))
local serialized = serialize_path(join_path(directory.path, dir))
if serialized then
serialized.is_directory = true
items[#items + 1] = {title = serialized.basename, value = serialized, hint = path_separator}
@@ -194,7 +194,7 @@ function open_file_navigation_menu(directory_path, handle_select, opts)
end
for _, file in ipairs(files) do
local serialized = serialize_path(utils.join_path(directory.path, file))
local serialized = serialize_path(join_path(directory.path, file))
if serialized then
serialized.is_file = true
items[#items + 1] = {title = serialized.basename, value = serialized}