mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-24 00:01:03 +00:00
feat: use USERPROFILE to retrieve readable path on Windows (#331)
This commit is contained in:
parent
2d6a95ff5a
commit
73941c2291
1 changed files with 1 additions and 1 deletions
|
|
@ -29,7 +29,7 @@ function utils.readable_size(size)
|
|||
end
|
||||
|
||||
function utils.readable_path(path)
|
||||
local home = os.getenv("HOME")
|
||||
local home = os.getenv("HOME") or os.getenv("USERPROFILE")
|
||||
if home == nil then
|
||||
return path
|
||||
elseif string.sub(path, 1, #home) == home then
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue