Try to get wine executable's name from /proc/self/comm

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

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

Loading…
Cancel
Save