fix: normalize cwd with '..'

This commit is contained in:
kiyan
2022-02-08 21:36:46 +01:00
parent d8bf1adcdc
commit 92a64daf27
2 changed files with 22 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ local uv = vim.loop
local git = require"nvim-tree.git"
local renderer = require"nvim-tree.renderer"
local utils = require"nvim-tree.utils"
local M = {}
@@ -12,7 +13,7 @@ local Explorer = {}
Explorer.__index = Explorer
function Explorer.new(cwd)
cwd = cwd or uv.cwd()
cwd = utils.path_normalize(cwd or uv.cwd())
return setmetatable({
cwd = cwd,
nodes = {}