From ec7b87b985bd2026c148aad9ee5996cec376ad4e Mon Sep 17 00:00:00 2001 From: Colin Date: Sun, 25 Aug 2024 19:18:06 +0000 Subject: [PATCH] bunpen: PARTIAL support for symlinks --- pkgs/additional/bunpen/restrict/namespace.ha | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/additional/bunpen/restrict/namespace.ha b/pkgs/additional/bunpen/restrict/namespace.ha index 18c54ced5..0f0bd7626 100644 --- a/pkgs/additional/bunpen/restrict/namespace.ha +++ b/pkgs/additional/bunpen/restrict/namespace.ha @@ -180,8 +180,9 @@ fn bind_component(old_fs: *fs::fs, new_fs: *fs::fs, strpath: str) (void | fs::er // }; if (fs::islink(st.mode)) { - log::printfln("TODO: support symlinks ({})", strpath); - return; + let linktext = fs::readlink(old_fs, strpath)?; + fs::symlink(new_fs, linktext, strpath)?; + // TODO: lots of edge cases with symlinks i need to flesh out here. } else if (fs::isdir(st.mode)) { fs::mkdir(new_fs, strpath, st.mode)?; } else {