[Rpm-maint] [rpm-software-management/rpm] Shell-like escaping support in %files (PR #1903)

Michal Domonkos notifications at github.com
Wed Mar 16 15:24:05 UTC 2022


@dmnks commented on this pull request.



> @@ -665,6 +665,20 @@ void rpmUnescape(char *s)
     *p = '\0';
 }
 
+void rpmUnescapeQuotes(char *s)
+{
+    char *p, *q;
+    int esc = 0;
+    p = q = s;
+    while (*q != '\0') {
+	*p = *q++;
+	esc = (*p == '\\') && !esc && *q == '"';

Can you elaborate? Note that this is meant to specifically unescape quotes only. Also, it's mostly just a modified copy&paste of the preceding `rpmUnescape()` function at the moment (refactoring will come later).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1903#discussion_r828139923
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/1903/review/911822242 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220316/1959fda9/attachment.html>


More information about the Rpm-maint mailing list