Skip to content

Commit 435035e

Browse files
committed
Address some code review
1 parent 2f69954 commit 435035e

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

src/Files.App.CsWin32/NativeMethods.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,4 @@ IApplicationDocumentLists
166166
ApplicationDocumentLists
167167
IApplicationActivationManager
168168
MENU_ITEM_TYPE
169+
COMPRESSION_FORMAT

src/Files.App/Data/Models/SelectedItemsPropertiesViewModel.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,9 @@ public bool? IsHiddenEditedValue
719719
}
720720

721721
private bool? isContentCompressed;
722+
/// <remarks>
723+
/// Applies to NTFS item compression.
724+
/// </remarks>
722725
public bool? IsContentCompressed
723726
{
724727
get => isContentCompressed;
@@ -730,13 +733,19 @@ public bool? IsContentCompressed
730733
}
731734

732735
private bool? isContentCompressedEditedValue;
736+
/// <remarks>
737+
/// Applies to NTFS item compression.
738+
/// </remarks>
733739
public bool? IsContentCompressedEditedValue
734740
{
735741
get => isContentCompressedEditedValue;
736742
set => SetProperty(ref isContentCompressedEditedValue, value);
737743
}
738744

739745
private bool canCompressContent;
746+
/// <remarks>
747+
/// Applies to NTFS item compression.
748+
/// </remarks>
740749
public bool CanCompressContent
741750
{
742751
get => canCompressContent;

src/Files.App/Helpers/Win32/Win32Helper.Storage.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
using Windows.Win32.Storage.FileSystem;
2020
using static Files.App.Constants.Widgets;
2121
using static Vanara.PInvoke.Kernel32;
22+
using COMPRESSION_FORMAT = Windows.Win32.Storage.FileSystem.COMPRESSION_FORMAT;
2223
using HRESULT = Vanara.PInvoke.HRESULT;
2324
using HWND = Vanara.PInvoke.HWND;
2425

@@ -990,8 +991,8 @@ public static unsafe bool SetCompressionAttributeIoctl(string lpFileName, bool i
990991

991992
var bytesReturned = 0u;
992993
var compressionFormat = isCompressed
993-
? Win32PInvoke.COMPRESSION_FORMAT_DEFAULT
994-
: Win32PInvoke.COMPRESSION_FORMAT_NONE;
994+
? COMPRESSION_FORMAT.COMPRESSION_FORMAT_DEFAULT
995+
: COMPRESSION_FORMAT.COMPRESSION_FORMAT_NONE;
995996

996997
var result = PInvoke.DeviceIoControl(
997998
new(hFile.DangerousGetHandle()),

0 commit comments

Comments
 (0)