mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix: apply suggested changes
This commit is contained in:
parent
7c72860d34
commit
885f9e823b
1 changed files with 1 additions and 2 deletions
|
|
@ -29,8 +29,7 @@ function utils.readable_size(size)
|
|||
end
|
||||
|
||||
function utils.readable_path(path)
|
||||
local home = os.getenv("HOME")
|
||||
home = home and home or os.getenv("USERPROFILE")
|
||||
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