From 885f9e823b9fa6d5813ac3dd3de36c320ca1b4e0 Mon Sep 17 00:00:00 2001 From: Simone Fidanza Date: Thu, 2 Nov 2023 09:24:30 +0100 Subject: [PATCH] fix: apply suggested changes --- yazi-plugin/preset/utils.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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