Skip to content

Commit

Permalink
add_inode: compressed files need both flag and unit size to be set
Browse files Browse the repository at this point in the history
  • Loading branch information
maharmstone committed Jan 1, 2021
1 parent 776de47 commit eddadeb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ntfs2btrfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1699,6 +1699,9 @@ static void add_inode(root& r, uint64_t inode, uint64_t ntfs_inode, bool& is_dir
file_size = att->Form.Nonresident.FileSize;
compression_unit = att->Form.Nonresident.CompressionUnit;
vdl = att->Form.Nonresident.ValidDataLength;

if (!(att->Flags & ATTRIBUTE_FLAG_COMPRESSION_MASK))
compression_unit = 0;
}

if (compression_unit != 0) {
Expand Down

0 comments on commit eddadeb

Please sign in to comment.