Skip to content

Commit

Permalink
Revert "fix(action.move): moving folders (#342)"
Browse files Browse the repository at this point in the history
This reverts commit 98101b2.
  • Loading branch information
jamestrew authored Dec 7, 2023
1 parent 98101b2 commit 219a45a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lua/telescope/_extensions/file_browser/actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,8 @@ fb_actions.move = function(prompt_bufnr)
local skipped = {}

for idx, selection in ipairs(selections) do
-- use vim.fs rather than plenary to fetch basename, more battle-tested
local old_path_absolute = selection:absolute()
if vim.fn.isdirectory(old_path_absolute) then
old_path_absolute = vim.fs.dirname(old_path_absolute)
end
local basename = vim.fs.basename(old_path_absolute)
local new_path = Path:new { target_dir, basename }
if new_path:exists() then
Expand Down

0 comments on commit 219a45a

Please sign in to comment.