From 9b3f9c46b91ce8607cac2931aa022942ab0a671b Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Fri, 19 Jan 2024 19:26:55 +0000 Subject: [PATCH] ls: Show T in long mode if sticky bit is set for non-executable files --- Userland/Utilities/ls.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Utilities/ls.cpp b/Userland/Utilities/ls.cpp index 281650c26c9..ac3d136827a 100644 --- a/Userland/Utilities/ls.cpp +++ b/Userland/Utilities/ls.cpp @@ -377,7 +377,7 @@ static bool print_filesystem_object(ByteString const& path, ByteString const& na st.st_mode & S_IWOTH ? 'w' : '-'); if (st.st_mode & S_ISVTX) - printf("t"); + printf("%c", st.st_mode & S_IXOTH ? 't' : 'T'); else printf("%c", st.st_mode & S_IXOTH ? 'x' : '-');