Skip to content

Commit 2c1375b

Browse files
authored
Properly name special NTFS file in the collected output (#112)
(DIS-2897)
1 parent a0c062f commit 2c1375b

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

acquire/acquire.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,12 @@ def collect_usnjrnl(cls, collector: Collector, fs: Filesystem, name: str) -> Non
328328
journal.seek(journal.runlist[i][1] * journal.block_size, io.SEEK_CUR)
329329
i += 1
330330

331+
# Use the same method to construct the output path as is used in
332+
# collector.collect_file()
333+
outpath = collector._output_path(f"{name}/$Extend/$Usnjrnl:$J")
334+
331335
collector.output.write(
332-
f"{collector.base}/{name}/$Extend/$Usnjrnl:$J",
336+
outpath,
333337
journal,
334338
size=journal.size - journal.tell(),
335339
entry=entry,
@@ -352,8 +356,13 @@ def collect_ntfs_secure(cls, collector: Collector, fs: Filesystem, name: str) ->
352356
secure_path = fs.path("$Secure:$SDS")
353357
entry = secure_path.get()
354358
sds = entry.open()
359+
360+
# Use the same method to construct the output path as is used in
361+
# collector.collect_file()
362+
outpath = collector._output_path(f"{name}/$Secure:$SDS")
363+
355364
collector.output.write(
356-
f"{collector.base}/{name}/$Secure:$SDS",
365+
outpath,
357366
sds,
358367
size=sds.size,
359368
entry=entry,

0 commit comments

Comments
 (0)