Skip to content

Conversation

@brutaldev
Copy link

It seems the latest distribution (15.0) does not include the version numbers for those bundles any longer:

image

Unfortunately I can't use TorFilePatternResolver this time because there needs to be a Version group match in order for the version to be accepted.

Despite the comment, in this case I think it's a good idea to fallback to the version in the list URL if there was a legitimate match. The regular expressions also changed to handle both in case the version numbers come back again.

Copilot AI review requested due to automatic review settings October 29, 2025 12:00
Copy link

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 modifies the regex patterns for Tor bundle filename matching to make the version number optional in the filename, allowing matching of files that don't contain explicit version information in their names. When the version is not present in the filename, the code falls back to using the version from the directory/version list URL.

Key Changes

  • Updated four regex patterns (Windows x86/x64, Linux x86/x64) to make the version capture group optional using (?:-(?<Version>[\d\.]+))?
  • Modified FetcherHelpers.cs to fall back to versionInfo.Version when the regex Version group is empty

Reviewed Changes

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

File Description
src/TorSharp/Tools/Tor/TorFetcher.cs Updated regex patterns to make version capture groups optional for all four platform/architecture combinations
src/TorSharp/Tools/FetcherHelpers.cs Added fallback logic to use versionInfo.Version when filename doesn't contain an explicit version

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

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.

1 participant