From 137d305f5bc6d2764b3914ef1b3c54e23d2699a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LAURENS=20J=C3=A9r=C3=B4me?= Date: Mon, 15 Jul 2024 16:33:38 +0200 Subject: [PATCH] Fix path.exists --- lua/pl/path.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/pl/path.lua b/lua/pl/path.lua index 7c5e2e65..6d63d121 100644 --- a/lua/pl/path.lua +++ b/lua/pl/path.lua @@ -154,7 +154,7 @@ end -- @return the file path if it exists (either as file, directory, socket, etc), nil otherwise function path.exists(P) assert_string(1,P) - return attrib(P,'mode') ~= nil and P + return attrib(P,'mode') ~= nil and P or nil end --- Return the time of last access as the number of seconds since the epoch.