Skip to content

Conversation

@paul-fresquet
Copy link
Contributor

@paul-fresquet paul-fresquet commented Jan 9, 2026

Summary:

  • Ensure inventory always scans the selected root path even when Hidden/System filters are enabled, while preserving child filtering.
  • Add unit tests to assert hidden/system child files are ignored, plus integration coverage for hidden root directories (Windows, Linux, macOS).

Implementation details:

  • Compare normalized paths to detect the selected root and bypass hidden/system checks only at that level.
  • Keep reparse/offline/exists checks unchanged.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 9, 2026

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an issue where inventory scanning would skip the selected root directory or file when Hidden/System file filters were enabled. The fix ensures that the root path specified by the user is always scanned, while still applying filters to child items.

Key changes:

  • Added path normalization and root detection logic to bypass Hidden/System filters at the root level only
  • Enhanced unit tests to verify both root and child filtering behavior
  • Added integration tests for hidden root directories on Windows, Linux, and macOS

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/ByteSync.Client/Services/Inventories/InventoryBuilder.cs Added IsRootPath() and NormalizePath() methods; modified file and directory analysis to skip Hidden/System checks for root paths
tests/ByteSync.Client.UnitTests/Services/Inventories/InventoryBuilderInspectorTests.cs Renamed and enhanced existing tests for root files; added tests for root directories and child file filtering
tests/ByteSync.Client.IntegrationTests/Services/Inventories/TestInventoryBuilder.cs Added platform-specific integration tests for hidden root directories

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@paul-fresquet paul-fresquet merged commit b2bcc1d into master Jan 9, 2026
30 checks passed
@paul-fresquet paul-fresquet deleted the fix/root-datasource-hidden branch January 9, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fix] Do not exclude selected root DataSource when 'Exclude hidden/system' is enabled

2 participants