Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check mixed case version files #3065

Merged
merged 1 commit into from
Jun 2, 2020
Merged

Conversation

HebaruSan
Copy link
Member

Problem

Two mods have vrefs and version files with non-lowercase file name extensions:

image

image

They're not being picked up.

Cause

The search for .version files is case sensitive.

Changes

  • Now the search for .version files is case insensitive, so these version files will be found
    • Both of them have severe syntax errors, so we'll need to remove the vrefs to inflate them, but that's better than having vrefs with version files that get silently ignored
  • Regexes for checking file extensions are replaced with string.EndsWith calls, which ought to be faster given the complexities of each operation (the runtime can jump to the common parts based on the string lengths and compare character by character, rather than building and running a finite state machine and feeding in the entire string character by character until it reaches the end)
  • The Regex for checking the vref-configurable AVC path is now compiled and only generated once, which again should be slightly better for performance

@HebaruSan HebaruSan added Pull request Netkan Issues affecting the netkan data labels May 31, 2020
@HebaruSan HebaruSan requested a review from DasSkelett May 31, 2020 19:13
Copy link
Member

@DasSkelett DasSkelett left a comment

Choose a reason for hiding this comment

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

Looks good

@HebaruSan HebaruSan merged commit 8dc185e into KSP-CKAN:master Jun 2, 2020
@HebaruSan HebaruSan deleted the fix/avc-case branch June 2, 2020 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Netkan Issues affecting the netkan data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants