Skip to content

Conversation

@echobt
Copy link
Contributor

@echobt echobt commented Jan 21, 2026

Description

This PR fixes a bug where setting max_file_size to 0 in the configuration was silently accepted, causing all files to be skipped during indexing.

Changes

  • Added validation in commands.rs to reject 0 as a value for max-file-size.
  • If a user attempts to set it to 0, vgrep now returns an error: Max file size must be greater than 0.

Verification

Reproduced the issue by running:

vgrep config set max-file-size 0

Before the fix, this succeeded. After the fix, it returns an error and prevents the invalid configuration.

Related to bounty issue #204.

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.

3 participants