Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: add win attrs support; #5722

Merged
merged 1 commit into from
Mar 6, 2025
Merged

Windows: add win attrs support; #5722

merged 1 commit into from
Mar 6, 2025

Conversation

chenjie4255
Copy link
Contributor

close #5693

Background

  • When setting attributes for a file or folder, winfsp call juicefs.chflags() and pass the attribute flags to juicefs.
  • According to this article, on windows sytem, the readonly attribute for a folder basically doesn't have any effect.
image

Test

run winfsp-test --fuse-external create*

  • before this PR, it failed for the create_fileattr_test and create_readonly_test.
  • after this PR, the failed tests passed. [tested on redis and sqlite, didn't test on tikv]

Discussion

  • Maybe we can ignore the FlagWindowsArchive? This is not used by any modern system accroding to this topic. but if we want to align the behavior of samba client for windows, this should be kept.

@chenjie4255
Copy link
Contributor Author

In the latest commit, the behavior of the read-only attribute has been aligned with the unix system (even for directories).

@davies davies merged commit 3624ac5 into main Mar 6, 2025
35 checks passed
@davies davies deleted the fix_winattr branch March 6, 2025 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows: Cannot set a file as read-only
2 participants