feat(file_selector): handle parsing oil directory (#2409)
This commit is contained in:
@@ -83,6 +83,7 @@ end
|
|||||||
|
|
||||||
function FileSelector:add_selected_file(filepath)
|
function FileSelector:add_selected_file(filepath)
|
||||||
if not filepath or filepath == "" or has_scheme(filepath) then return end
|
if not filepath or filepath == "" or has_scheme(filepath) then return end
|
||||||
|
if filepath:match("^oil:") then filepath = filepath:gsub("^oil:", "") end
|
||||||
local absolute_path = Utils.to_absolute_path(filepath)
|
local absolute_path = Utils.to_absolute_path(filepath)
|
||||||
local stat = vim.loop.fs_stat(absolute_path)
|
local stat = vim.loop.fs_stat(absolute_path)
|
||||||
if stat and stat.type == "directory" then
|
if stat and stat.type == "directory" then
|
||||||
|
|||||||
Reference in New Issue
Block a user