mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Fixed bug with $attachments in shell command
SVN revision: 2347
This commit is contained in:
parent
a5e17dc081
commit
b1f627ba8b
@ -1272,8 +1272,7 @@ void strsubst_list(char *string, int size, char name[][NAME_LENGTH], char value[
|
|||||||
/* check for $shell() subsitution */
|
/* check for $shell() subsitution */
|
||||||
pt = tmp;
|
pt = tmp;
|
||||||
ps = string;
|
ps = string;
|
||||||
p = strchr(ps, '$');
|
for (p = strchr(ps, '$'); p != NULL; p = strchr(ps, '$')) {
|
||||||
if (p != NULL) {
|
|
||||||
|
|
||||||
/* copy leading characters */
|
/* copy leading characters */
|
||||||
j = (int) (p - ps);
|
j = (int) (p - ps);
|
||||||
@ -1317,6 +1316,9 @@ void strsubst_list(char *string, int size, char name[][NAME_LENGTH], char value[
|
|||||||
|
|
||||||
strlcpy(pt, result, sizeof(tmp) - (pt - tmp));
|
strlcpy(pt, result, sizeof(tmp) - (pt - tmp));
|
||||||
pt += strlen(pt);
|
pt += strlen(pt);
|
||||||
|
} else {
|
||||||
|
*pt++ = '$';
|
||||||
|
ps = p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user