Skip to content

Commit

Permalink
Wof fix
Browse files Browse the repository at this point in the history
* Fixed issue with opening other attributes than default $DATA attribute
  • Loading branch information
LTRData committed Apr 29, 2024
1 parent f8a410b commit 23dc6ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Library/DiscUtils.Ntfs/Internals/Wof.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ public static SparseStream OpenWofReparsePoint(File file,
NtfsStream ntfsStream,
ReparsePointRecord reparsePoint)
{
if (!info.FileAttributes.HasFlag(NtfsFileAttributes.SparseFile)
if (attr.PrimaryRecord.AttributeType != AttributeType.Data
|| !string.IsNullOrWhiteSpace(attr.PrimaryRecord.Name)
|| !info.FileAttributes.HasFlag(NtfsFileAttributes.SparseFile)
|| file.GetStream(AttributeType.Data, "WofCompressedData") is not { } compressedStream)
{
return null;
Expand Down

0 comments on commit 23dc6ce

Please sign in to comment.