Project
vgrep
Description
In search.rs line 43, std::fs::canonicalize(path).unwrap_or_else(|_| path.to_path_buf()) falls back to the original path if canonicalization fails. If the original path is relative, this could cause issues with database queries that expect absolute paths.
Error Message
Debug Logs
System Information
OS: Any
Rust Version: 1.75+
Screenshots
No response
Steps to Reproduce
- Search with a relative path that doesn't exist yet (e.g., a new directory)
- Observe query behavior
Expected Behavior
Either fail clearly if path doesn't exist, or convert to absolute path using current_dir
Actual Behavior
May use relative path for database query, causing incorrect path matching
Additional Context
No response
Project
vgrep
Description
In
search.rsline 43,std::fs::canonicalize(path).unwrap_or_else(|_| path.to_path_buf())falls back to the original path if canonicalization fails. If the original path is relative, this could cause issues with database queries that expect absolute paths.Error Message
Debug Logs
System Information
Screenshots
No response
Steps to Reproduce
Expected Behavior
Either fail clearly if path doesn't exist, or convert to absolute path using current_dir
Actual Behavior
May use relative path for database query, causing incorrect path matching
Additional Context
No response