[Rpm-maint] [rpm-software-management/rpm] add build directory auto path to %autosetup step (PR #2859)

Panu Matilainen notifications at github.com
Mon Jan 22 11:49:54 UTC 2024


@pmatilai commented on this pull request.



> @@ -78,16 +84,81 @@ static char *doUncompress(const char *fn)
     return cmd;
 }
 
+/**
+ * Detect if an archive has a single top level entry, and it's a directory.
+ *
+ * @param path	path of the archive
+ * @return	1 if archive as only a directory as top level entry,
+ * 		0 if it contains multiple top level entries or a single file
+ * 		-1 on archive error
+ */
+static int singleRoot(const char *path)
+{
+	struct archive *a;
+	struct archive_entry *entry;
+	int r, ret, rootLen;
+	char *rootName;

Just initialize this to NULL and then you no longer need two different exit labels.

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

Message ID: <rpm-software-management/rpm/pull/2859/review/1836285868 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240122/3617b744/attachment.html>


More information about the Rpm-maint mailing list