Skip to content

Commit

Permalink
fixup! Handle paths relative to custom path in utils.pick_file
Browse files Browse the repository at this point in the history
  • Loading branch information
mfussenegger committed May 23, 2024
1 parent 540c868 commit b33660d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lua/dap/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,11 @@ local function get_files(path, opts)
if vim.fs.dir then
local files = {}
for name, type in vim.fs.dir(path, { depth = 50 }) do
if type == "file" and filter(name) then
table.insert(files, vim.fs.joinpath(path, name))
if type == "file" then
local filepath = vim.fs.joinpath(path, name)
if filter(filepath) then
table.insert(files, vim.fs.joinpath(path, name))
end
end
end
return files
Expand Down

0 comments on commit b33660d

Please sign in to comment.