Record evidence-relative source paths for directory and single-file inputs - #222
Merged
Merged
Conversation
…nputs FileSeekerDir recorded the absolute path on the examiner's machine in file_infos and FileSeekerFile its absolute input path, while the zip, tar, raw image and iVa seekers record where the file sits in the evidence. The value reaches the LAVA _file_path_list, every media item's source_path and any artifact that reads file_infos, so the same column meant two different things depending on the input type, and a directory input published the examiner's folder layout. Both now record the evidence form: the path relative to the input directory with forward slashes, or the file name for a single-file input. The case-variant tag already hashed that spelling, so tagged copies keep their names. The directory seeker also built each staged path by slicing the input path off the front of the match and dropping one more character. An input ending in a separator lost the first letter of every staged path, and an input of '.' lost every dot. os.path.relpath handles both, and the extended-length prefix the entry points add on Windows. The new test runs the real seekers against a small tree with the input given as an absolute path, with a trailing separator, relative, and as '.'. On Windows it also tries the extended-length prefix, and the Windows smoke job now runs it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Records an evidence-relative path in file_infos for directory and single-file inputs, the form the zip, tar, raw image and iVa seekers already record. The value reaches the LAVA file list, every media source path and any artifact that reads file_infos, so a report from a directory input no longer carries the examiner's own folder layout.
Also fixes the directory seeker's staged paths, which lost their first character when the input path ended in a separator and lost every dot when the input was a bare dot.
The new test also runs on the Windows smoke job, which covers the extended-length prefix the entry points add there.
Same change as abrignoni/iLEAPP#2215, for abrignoni/iLEAPP#2057.
Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com