mirror of
https://github.com/PancakeTAS/lsfg-vk.git
synced 2025-10-30 07:01:10 +00:00
feat(exe): fixing processes with space in their name
This commit is contained in:
parent
e09d590f2d
commit
60baec1e26
1 changed files with 8 additions and 4 deletions
|
|
@ -251,11 +251,15 @@ std::pair<std::string, std::string> Utils::getProcessName() {
|
|||
if (!line.ends_with(".exe"))
|
||||
continue;
|
||||
|
||||
const size_t pos = line.find_last_of(' ');
|
||||
size_t pos = line.find_first_of('/');
|
||||
if (pos == std::string::npos) {
|
||||
pos = line.find_last_of(' ');
|
||||
if (pos == std::string::npos)
|
||||
continue;
|
||||
pos += 1; // skip space
|
||||
}
|
||||
|
||||
const std::string exe_name = line.substr(pos + 1);
|
||||
const std::string exe_name = line.substr(pos);
|
||||
if (exe_name.empty())
|
||||
continue;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue