feat(yazi-plugin): retrieve HOME also on windows

This commit is contained in:
Simone Fidanza 2023-11-02 09:04:40 +01:00
parent f9fbe7225a
commit 7c72860d34

View file

@ -30,6 +30,7 @@ end
function utils.readable_path(path)
local home = os.getenv("HOME")
home = home and home or os.getenv("USERPROFILE")
if home == nil then
return path
elseif string.sub(path, 1, #home) == home then