Skip to content

Conversation

Rob-Hague
Copy link
Collaborator

To get the file type, S_IFMT should be used as the mask. Instead it was using each file type as the mask. It meant that e.g. a symbolic link would also show as a regular file and a character device.

Also allow setting and retrieving the setuid/setgid/sticky bits

closes #1000
closes #159

To get the file type, S_IFMT should be used as the mask. Instead it was using each file
type as the mask. It meant that e.g. a symbolic link would also show as a regular file
and a character device.

Also allow setting and retrieving the setuid/setgid/sticky bits
@@ -506,7 +708,7 @@ public byte[] GetBytes()
{
uint flag = 0;

if (IsSizeChanged && IsRegularFile)
Copy link
Collaborator Author

@Rob-Hague Rob-Hague Aug 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have removed the IsRegularFile condition because I don't think it needs to exist. And given the bug, this condition would still have passed for a symbolic link, so this is more like keeping the behaviour the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant