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

Properly match new files on windows when doing file acquisition #2329

Merged
merged 2 commits into from
Jul 6, 2023

Conversation

blotus
Copy link
Member

@blotus blotus commented Jul 4, 2023

path.Match does not actually work on Windows as \ is treated as an escape character, so it will never matches.

Use filepath.Match which properly handles \ (at the cost of disabling escaping, but this is likely a non-issue).

@github-actions
Copy link

github-actions bot commented Jul 4, 2023

@blotus: There are no 'kind' label on this PR. You need a 'kind' label to generate the release automatically.

  • /kind feature
  • /kind enhancement
  • /kind fix
  • /kind chore
  • /kind dependencies
Details

I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

@github-actions
Copy link

github-actions bot commented Jul 4, 2023

@blotus: There are no area labels on this PR. You can add as many areas as you see fit.

  • /area agent
  • /area local-api
  • /area cscli
  • /area security
  • /area configuration
Details

I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

@codecov
Copy link

codecov bot commented Jul 4, 2023

Codecov Report

Merging #2329 (85a6380) into master (73f71a0) will increase coverage by 0.07%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #2329      +/-   ##
==========================================
+ Coverage   56.25%   56.33%   +0.07%     
==========================================
  Files         182      186       +4     
  Lines       25363    25762     +399     
==========================================
+ Hits        14269    14514     +245     
- Misses       9570     9685     +115     
- Partials     1524     1563      +39     
Flag Coverage Δ
bats 37.77% <0.00%> (-0.05%) ⬇️
unit-linux 54.80% <100.00%> (-0.06%) ⬇️
unit-windows 51.39% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/acquisition/modules/file/file.go 66.92% <100.00%> (+0.08%) ⬆️

... and 15 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@blotus
Copy link
Member Author

blotus commented Jul 4, 2023

/kind fix

@blotus blotus merged commit 1295de9 into master Jul 6, 2023
@blotus blotus deleted the fix-new-file-detection-windows branch July 6, 2023 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants