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
{
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

@Rob-Hague Rob-Hague merged commit af279d2 into sshnet:develop Oct 1, 2025
4 checks passed
@Rob-Hague Rob-Hague deleted the sftpfileattributes branch October 1, 2025 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants