diff --git a/yazi-plugin/preset/utils.lua b/yazi-plugin/preset/utils.lua index 8e9989a3..05872313 100644 --- a/yazi-plugin/preset/utils.lua +++ b/yazi-plugin/preset/utils.lua @@ -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