Remove ".exe" from wine executable's name

Fixes ad4e1ac35f
pull/517/head
jackun 3 years ago
parent ad4e1ac35f
commit ea07d1e080
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

@ -121,7 +121,10 @@ std::string get_wine_exe_name(bool keep_ext)
std::string line = read_line("/proc/self/comm"); // max 16 characters though
if (ends_with(line, ".exe", true))
return line;
{
auto dot = keep_ext ? std::string::npos : line.find_last_of('.');
return line.substr(0, dot);
}
std::ifstream cmdline("/proc/self/cmdline");
// Iterate over arguments (separated by NUL byte).

Loading…
Cancel
Save