Skip to content

[BUG] run_index Creates ServerIndexer with Unchecked Database Path #192

@xyz080125

Description

@xyz080125

Project

vgrep

Description

In commands.rs run_index function, Database::new(&config.db_path()?) is called without checking if the parent directory exists or if the user has write permissions. This can lead to confusing errors.

Error Message

Debug Logs

System Information

OS: Any
Rust Version: 1.75+

Screenshots

No response

Steps to Reproduce

  1. Configure vgrep with a db_path in a non-existent directory
  2. Run vgrep index
  3. Observe error

Expected Behavior

Clear error message about directory not existing, or automatic directory creation

Actual Behavior

SQLite error about being unable to open database

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingvalidValid issuevgrep

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions