@pmatilai commented on this pull request.


> +     if (!strcmp(buf, "")) {
+           buf = rstrcat(&buf, ".");
+       } else if (strcmp(buf, ".") && strcmp(buf, "..") && strcmp(buf, "/")) {
+           /* strip trailing / */
+           size_t l = strlen(buf);
+           if (buf[l-1] == '/')
+               buf[l-1] = '\0';
+           if ((b = strrchr(buf, '/')) != NULL)
+               if (b == buf)
+                   /* keep root dir */
+                   buf[1] = '\0';
+               else
+                   *b = '\0';
+           else
+               strcpy(buf, ".");
+       }

It's a good question. You have to go pretty far back (commit 
94f5fbeec363059ca9eb986ee294ffcdf20bcb04) and come back none the wiser :smile: 

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

Message ID: <rpm-software-management/rpm/pull/2945/review/1916810...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to