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 3d77bf6b931aa70c902f157af99f9e5f0e811b59
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
AuthorDate: Fri Sep 6 14:21:13 2024 +0100
fix command parsing to not get confused with cmdline args with slash
---
src/bin/system/process.c | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/src/bin/system/process.c b/src/bin/system/process.c
index 25db818..7eb472c 100644
--- a/src/bin/system/process.c
+++ b/src/bin/system/process.c
@@ -179,8 +179,28 @@ _cmd_args(Proc_Info *p, char *name, size_t len)
{
int sz = ftell(f);
Eina_Strbuf *buf = eina_strbuf_new();
+ char *line2 = strdup(line);
- snprintf(name, len, "%s", ecore_file_file_get(line));
+ if (line2)
+ { // copy line up to first blank into line2 then 0 terminate
+ char *p, *p2, *file;
+
+ for (p = line, p2 = line2; *p; p++, p2++)
+ {
+ if (isblank(*p))
+ {
+ *p2 = '\0';
+ break;
+ }
+ p2[0] = p[0];
+ p2[1] = '\0';
+ }
+ // use file portion of this path as the name
+ 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.