Do not die when invoked via `vita` symlink

test-assert
Vitaliy Filippov 2021-12-10 02:45:16 +03:00
parent b82c30328f
commit 5a234588b9
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ json11::Json::object cli_tool_t::parse_args(int narg, const char *args[])
if (!cmd.size()) if (!cmd.size())
{ {
std::string exe(exe_name); std::string exe(exe_name);
if (exe.substr(exe.size()-11) == "vitastor-rm") if (exe.size() >= 11 && exe.substr(exe.size()-11) == "vitastor-rm")
{ {
cmd.push_back("rm-data"); cmd.push_back("rm-data");
} }