Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
scudette committed Jul 26, 2024
1 parent 8fd6d33 commit 24cc351
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bin/usn.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ func doUSN() {
filename_filter, err := regexp.Compile(*usn_command_filename_filter)
kingpin.FatalIfError(err, "Filename filter")

for record := range parser.ParseUSN(context.Background(), ntfs_ctx, 0) {
usn_stream, err := parser.OpenUSNStream(ntfs_ctx)
kingpin.FatalIfError(err, "OpenUSNStream")

for record := range parser.ParseUSN(context.Background(),
ntfs_ctx, usn_stream, 0) {
mft_id := record.FileReferenceNumberID()
mft_seq := uint16(record.FileReferenceNumberSequence())

Expand All @@ -92,7 +96,8 @@ func doUSN() {
})
}

for record := range parser.ParseUSN(context.Background(), ntfs_ctx, 0) {
for record := range parser.ParseUSN(
context.Background(), ntfs_ctx, usn_stream, 0) {
filename := record.Filename()

if !filename_filter.MatchString(filename) {
Expand Down

0 comments on commit 24cc351

Please sign in to comment.