mirror of
https://github.com/sxyazi/yazi.git
synced 2024-12-18 14:21:32 +03:00
feat: use USERPROFILE
to retrieve readable path on Windows (#331)
This commit is contained in:
parent
2d6a95ff5a
commit
73941c2291
@ -29,7 +29,7 @@ function utils.readable_size(size)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function utils.readable_path(path)
|
function utils.readable_path(path)
|
||||||
local home = os.getenv("HOME")
|
local home = os.getenv("HOME") or os.getenv("USERPROFILE")
|
||||||
if home == nil then
|
if home == nil then
|
||||||
return path
|
return path
|
||||||
elseif string.sub(path, 1, #home) == home then
|
elseif string.sub(path, 1, #home) == home then
|
||||||
|
Loading…
Reference in New Issue
Block a user