Skip to content

Commit

Permalink
fix: trim scheme from file uri
Browse files Browse the repository at this point in the history
  • Loading branch information
willothy committed Dec 29, 2024
1 parent de9f7b0 commit 9e55edc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/flatten/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,11 @@ function M.edit_files(opts)
for i, fname in ipairs(files) do
local is_absolute
if vim.fn.has("win32") == 1 then
is_absolute = string.find(fname, "^%a:") ~= nil
is_absolute = string.find(string.gsub(fname, "^%s+://", ""), "^%a:")
~= nil
else
is_absolute = string.find(fname, "^/") ~= nil
is_absolute = string.find(string.gsub(fname, "^%s+://", ""), "^/")
~= nil
end

local fpath = is_absolute and fname or (guest_cwd .. "/" .. fname)
Expand Down

0 comments on commit 9e55edc

Please sign in to comment.