fix (lib/cpp): auto-pack included absolute symlinks #1

Merged
sisungo merged 1 commits from sisungo/semios-packages:master into master 2026-06-09 21:49:00 +08:00
+3 -1
View File
@@ -27,7 +27,9 @@ def _do_auto_pack(pc: pkgcomposer.PkgComposer, srcdir: str, dstdir: str, filter)
if filter(ent):
if ent.is_dir(follow_symlinks=False):
pc.makedir(f"{dstdir}/{ent.name}")
else:
elif ent.is_file(follow_symlinks=False):
pc.addfile(ent.path, f"{dstdir}/{ent.name}")
elif ent.is_symlink() and not os.path.isabs(os.readlink(ent.path)):
pc.addfile(ent.path, f"{dstdir}/{ent.name}")