From ea9e38f6bb1d03519088292f4608116f3b045cdf Mon Sep 17 00:00:00 2001 From: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> Date: Sun, 8 Nov 2026 15:02:56 -0500 Subject: [PATCH] fix(native): keep the visible name of link2symlink binaries --- tools/nativeguest/hook/exec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/nativeguest/hook/exec.c b/tools/nativeguest/hook/exec.c index 0928835b3..95f5cc4a3 100644 --- a/tools/nativeguest/hook/exec.c +++ b/tools/nativeguest/hook/exec.c @@ -37,6 +37,10 @@ static void resolve_symlinks(const char *path, char *out, size_t out_size, int d ddnatv_copy_cstr(next_path, sizeof(next_path), link_target); } } + // proot's link2symlink leaves hard links as ".l2s.*" files that programs must not see by name + const char *next_base = strrchr(next_path, '/'); + next_base = next_base ? next_base + 1 : next_path; + if (strncmp(next_base, ".l2s.", 5) == 0) return; resolve_symlinks(next_path, out, out_size, depth + 1); }