[PR #397] [MERGED] Fix oversight where Scanner.cs won't scan for files if an archive extracts to one or more directories #542

Closed
opened 2026-01-29 21:11:11 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/SabreTools/BinaryObjectScanner/pull/397
Author: @HeroponRikiBestest
Created: 11/29/2025
Status: Merged
Merged: 11/29/2025
Merged by: @mnadareski

Base: masterHead: patch-3


📝 Commits (2)

  • 29b4fe7 Scanner.cs won't scan for files if an archive extracts to a directory
  • 26887c8 use fsentries

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 BinaryObjectScanner/Scanner.cs (+1 -1)

📄 Description

At the moment, scanner.cs determines whether scanning needs to be done to any files extracted from an archive by checking IOExtensions.SafeGetFiles(tempPath).Length > 0 on the extracted path. Some archives extract to one or more top-level directories that contain files within themselves, resulting in nothing being scanned. This PR checks the number of directories too. Unsure if you'd want to have some sort of logic to check if the directories are empty or not.

Example archive, if needed (unrar.7z):
unrar.7z.zip


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/SabreTools/BinaryObjectScanner/pull/397 **Author:** [@HeroponRikiBestest](https://github.com/HeroponRikiBestest) **Created:** 11/29/2025 **Status:** ✅ Merged **Merged:** 11/29/2025 **Merged by:** [@mnadareski](https://github.com/mnadareski) **Base:** `master` ← **Head:** `patch-3` --- ### 📝 Commits (2) - [`29b4fe7`](https://github.com/SabreTools/BinaryObjectScanner/commit/29b4fe73a95c5d817146d7329a0a42ff7a23d3b4) Scanner.cs won't scan for files if an archive extracts to a directory - [`26887c8`](https://github.com/SabreTools/BinaryObjectScanner/commit/26887c811ba79f963e0d9ea07c77e3d4213cb692) use fsentries ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `BinaryObjectScanner/Scanner.cs` (+1 -1) </details> ### 📄 Description At the moment, scanner.cs determines whether scanning needs to be done to any files extracted from an archive by checking `IOExtensions.SafeGetFiles(tempPath).Length > 0` on the extracted path. Some archives extract to one or more top-level directories that contain files within themselves, resulting in nothing being scanned. This PR checks the number of directories too. Unsure if you'd want to have some sort of logic to check if the directories are empty or not. Example archive, if needed (unrar.7z): [unrar.7z.zip](https://github.com/user-attachments/files/23835549/unrar.7z.zip) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 21:11:11 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SabreTools/BinaryObjectScanner#542