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

git pushed a commit to branch master
in repository enigmatic.

View the commit online.

commit cc062e3ce04571da8151f37497f2fc3db7229e92
Author: Alastair Poole <m...@alastairpoole.com>
AuthorDate: Fri Sep 6 15:05:01 2024 +0100

    process: fix command parsing to not get confused.
    
    This is directly from raster and untested. I trust you old man!
---
 src/bin/system/process.c | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/src/bin/system/process.c b/src/bin/system/process.c
index 755375c..7f87707 100644
--- a/src/bin/system/process.c
+++ b/src/bin/system/process.c
@@ -181,9 +181,27 @@ _cmd_args(Proc_Info *p, char *name, size_t len)
           {
              int sz = ftell(f);
              Eina_Strbuf *buf = eina_strbuf_new();
+             char *line2 = strdup(line);
+             if (line2)
+               {
+                  char *p, *p2;
+                  const char *file;
 
-             if (ecore_file_exists(line))
-               snprintf(name, len, "%s", ecore_file_file_get(line));
+                  for (p = line, p2 = line2; *p; p++, p2++)
+                    {
+                       if (isblank(*p))
+                         {
+                            *p2 = '\0';
+                            break;
+                         }
+                       p2[0] = p[0];
+                       p2[1] = '\0';
+                    }
+                  file = ecore_file_file_get(line2);
+                  snprintf(name, len, "%s", file);
+                  free(line2);
+                }
+             else name[0] = '\0';
 
              const char *cp = line;
              for (int i = 0; i < sz; i++)

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

Reply via email to