We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent edbf62f commit b3b848fCopy full SHA for b3b848f
lua/nvim-tree/utils.lua
@@ -289,6 +289,10 @@ function M.rename_loaded_buffers(old_path, new_path)
289
end
290
291
292
+local is_windows_drive = function(path)
293
+ return (M.is_windows) and (path:match('^%a:\\$') ~= nil)
294
+end
295
+
296
---@param path string path to file or directory
297
---@return boolean
298
function M.file_exists(path)
@@ -306,6 +310,10 @@ function M.file_exists(path)
306
310
-- access Windows files directly.
307
311
-- For more details see (#3117).
308
312
313
+ if is_windows_drive(path) then
314
+ return vim.fn.isdirectory(path) == 1
315
+ end
316
309
317
local parent = vim.fn.fnamemodify(path, ":h")
318
local filename = vim.fn.fnamemodify(path, ":t")
319
0 commit comments