[Bug] Findex panics when ApplicationCommand::Command
variants RString
is empty
#46
Labels
bug
Something isn't working
Description
When passing an empty
Rstring
toApplicationCommand::Command
in the returnRVec<FResult>
of a pluginshandle_query
function, Findex panics atcrates/findex/src/gui/result_list_row.rs:136:42
.Do you already have Findex Installed? (If yes, how did you install?)
I have installed Findex with the automated method detailed in INSTALLATION.md.
Also, to test and attempt to fix the issue, I cloned the repo and ran Findex in release mode.
To Reproduce
Return this from a plugins
handle_query
function:Expected behavior
For the program to execute no command
System information
Output of
rustc --version --verbose
(if you compiled findex on your machine):Additional context
To fix this issue, I added the below code above result_list_row.rs:132:
I'm not sure if returning when the
cmd
RString
is empty would be the most optimal solution. Adding aNone
variant to theApplicationCommand
enum or wrappingcmd
in anROption
could be better options. Both would break plugins, either requiring recompilation or rewriting and recompilation, though.The text was updated successfully, but these errors were encountered: