This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository evisum.

View the commit online.

commit 9c8e67e86d9fec41f766912010351e4669851921
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
AuthorDate: Fri Sep 6 17:15:10 2024 +0100

    process name - special case wine/windows exes with e.g. C:\path\cmd.exe
---
 src/bin/system/process.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/bin/system/process.c b/src/bin/system/process.c
index 7eb472c..c440bd6 100644
--- a/src/bin/system/process.c
+++ b/src/bin/system/process.c
@@ -196,7 +196,20 @@ _cmd_args(Proc_Info *p, char *name, size_t len)
                        p2[1] = '\0';
                     }
                   // use file portion of this path as the name
-                  file = ecore_file_file_get(line2);
+                  if ((line2[0] >= 'A') && (line2[0] <= 'Z') &&
+                      (line2[1] == ':') && (line2[2] == '\\'))
+                   { // special case what looks like as wine/proton windows
+                     // exe cmdline. fine last backslash similar to below
+                     file = strrchr(line2, '\\');
+                     if (file) file++;
+                     else file = line2;
+                   }
+                  else
+                   { // get last / and use name of file after that if / exists
+                     file = strrchr(line2, '/');
+                     if (file) file++;
+                     else file = line2;
+                   }
                   snprintf(name, len, "%s", file);
                   free(line2);
                }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to