From c1e423be0dcd4c3ac8309e7b4455da6aa3127676 Mon Sep 17 00:00:00 2001
From: midipix <writeonce@midipix.org>
Date: Thu, 8 Feb 2024 08:34:42 +0000
Subject: slbt_archive_import(): check whether the imported archive is a
 placeholder.

---
 src/helper/slbt_archive_import.c | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'src')

diff --git a/src/helper/slbt_archive_import.c b/src/helper/slbt_archive_import.c
index 924a54f..051c817 100644
--- a/src/helper/slbt_archive_import.c
+++ b/src/helper/slbt_archive_import.c
@@ -6,6 +6,7 @@
 
 #include <slibtool/slibtool.h>
 #include "slibtool_driver_impl.h"
+#include "slibtool_symlink_impl.h"
 #include "slibtool_errinfo_impl.h"
 
 /* legacy fallback, no longer in use */
@@ -56,6 +57,11 @@ int slbt_archive_import(
 	char *				dstarchive,
 	char *				srcarchive)
 {
+	if (slbt_symlink_is_a_placeholder(
+			slbt_driver_fdcwd(dctx),
+			srcarchive))
+		return 0;
+
 	return slbt_archive_import_impl(
 		dctx,ectx,
 		dstarchive,
-- 
cgit v1.2.3