ls: Show T in long mode if sticky bit is set for non-executable files

This commit is contained in:
Tim Ledbetter 2024-01-19 19:26:55 +00:00 committed by Tim Flynn
parent 0266a32580
commit 9b3f9c46b9
Notes: sideshowbarker 2024-07-16 23:03:06 +09:00

View File

@ -377,7 +377,7 @@ static bool print_filesystem_object(ByteString const& path, ByteString const& na
st.st_mode & S_IWOTH ? 'w' : '-'); st.st_mode & S_IWOTH ? 'w' : '-');
if (st.st_mode & S_ISVTX) if (st.st_mode & S_ISVTX)
printf("t"); printf("%c", st.st_mode & S_IXOTH ? 't' : 'T');
else else
printf("%c", st.st_mode & S_IXOTH ? 'x' : '-'); printf("%c", st.st_mode & S_IXOTH ? 'x' : '-');