[Rpm-maint] [rpm-software-management/rpm] rpmuncompress: Support -C for zip and 7zip archives (PR #3263)

Panu Matilainen notifications at github.com
Fri Aug 30 05:49:04 UTC 2024


@pmatilai commented on this pull request.



>  	    rasprintf(&stripcd, " -C '%s' %s", dstpath, sr ? "--strip-components=1" : "");
+	else {
+	    char * moveup;
+	    if (sr)
+		rasprintf(&moveup, " ; tmp=`mktemp -u -p'%s'` ; mv %s/%s $tmp ; (shopt -s dotglob; mv $tmp/* %s) ; rmdir $tmp ", dstpath, dstpath, sr, dstpath);
+	    rasprintf(&stripcd, "%s'%s'%s", at->dest, dstpath, sr ? moveup : "");
+	    free(moveup);
+	}
+	free(sr);
+    } else {
+	mkdir = strdup("");
+	stripcd = strdup("");

When in rpm, use rstrdup() aka xstrdup() instead (although in the next weeks we'll need to stop adding more C based stuff in the first place)

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

Message ID: <rpm-software-management/rpm/pull/3263/review/2271239814 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240829/0c0c4984/attachment.html>


More information about the Rpm-maint mailing list