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

Implemented compression in properties #16319

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

d2dyno1
Copy link
Member

@d2dyno1 d2dyno1 commented Oct 7, 2024

Summary
This PR continues on the work made in the ya/CompressedAttribute branch and fixes the broken logic to actually enable/disable compression for items

FYI @yaira2

Resolved / Related Issues

Todo

  • Tested setting compression for files
  • Tested setting compression for folders
  • Add a GetVolumeInformation check to see if volume supports compression through FILE_FILE_COMPRESSION attribute

@0x5bfa 0x5bfa self-requested a review October 8, 2024 01:16
Copy link
Member

@0x5bfa 0x5bfa left a comment

Choose a reason for hiding this comment

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

Summary

  • Please use the constants win32metadata defines.
  • Simplified some if-else's.

src/Files.App/Helpers/Win32/Win32Helper.Storage.cs Outdated Show resolved Hide resolved
src/Files.App/Helpers/Win32/Win32Helper.Storage.cs Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

Please revert changes in this file.

Copy link
Member Author

Choose a reason for hiding this comment

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

No (see comment)

@d2dyno1
Copy link
Member Author

d2dyno1 commented Oct 28, 2024

@0x5bfa I implemented the changes you requested. Unfortunately, some of them didn't compile and CsWin32 didn't feel like SG-ing enums for me so I reverted to the old values.

@0x5bfa
Copy link
Member

0x5bfa commented Oct 28, 2024

Can you try to add "COMPRESSION_FORMAT" and "FILE_ACCESS_RIGHTS" in NativeMethods.txt beforehand and use these enums?

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.

Feature: Add 'compress' attribute to folder/file
2 participants