bunpen: PARTIAL support for symlinks

This commit is contained in:
2024-08-25 19:18:06 +00:00
parent 9f5d7f2bb2
commit ec7b87b985

View File

@@ -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 {