Go to file
ComixHe b1c7fa13d8 fix: handle broken symlinks during mount destination creation
When a destination file doesn't exist, the previous implementation couldn't
distinguish between creation failure due to existing files vs other reasons.
If both opening and creating fail, the destination is definitely a broken symlink.

- Add recursive symlink resolution with depth limit (32) in create_destination_file()
- Use O_NOFOLLOW to detect symlink during file creation
- When creation fails with ELOOP, read symlink target and recursively create it
- Replace filesystem functions with internal utils for consistent error handling
- Add proper broken symlink detection and resolution logic

This ensures mount destinations work correctly even when they point to
broken symlinks, by creating the missing target files in the symlink chain.

Signed-off-by: ComixHe <ComixHe1895@outlook.com>
2025-08-29 17:51:36 +08:00
.github/workflows ci: remove auto-tag 2024-11-11 16:27:51 +08:00
.obs build: remove /archlinux 2023-12-27 10:13:57 +08:00
LICENSES build: vendoring CLI11 and nlohmann_json 2025-04-01 17:36:48 +08:00
app/ll-box/src chore: update reuse and SPDX comment 2025-02-27 20:37:19 +08:00
cmake build: support fetching deps by CPM 2025-03-26 17:55:44 +08:00
cmake.external chore: add version information for vendoring dependencies 2025-06-13 13:12:28 +08:00
external chore: update dependency 'nlohmann_json' 2025-04-15 10:51:14 +08:00
src/linyaps_box fix: handle broken symlinks during mount destination creation 2025-08-29 17:51:36 +08:00
tests feat: add ns_last_pid extension test and enhance test framework 2025-08-06 11:53:44 +08:00
tools chore: update reuse and SPDX comment 2025-02-27 20:37:19 +08:00
.clang-format build: refactory CMakeLists 2024-11-11 16:26:00 +08:00
.cmake-format.py add format file and fix issue (#37) 2025-03-11 15:46:49 +08:00
.deepsource.toml chore: add deepsource config 2025-07-18 14:50:46 +08:00
.editorconfig add format file and fix issue (#37) 2025-03-11 15:46:49 +08:00
.gitignore refactor: adjust the behavior of mount process 2025-03-06 14:28:21 +08:00
CMakeLists.txt refactor: resolving the most of compiler warnings 2025-08-26 14:45:06 +08:00
CMakePresets.json chore: update CMake preset 2025-07-18 11:15:47 +08:00
LICENSE feat: add license 2022-11-25 13:32:19 +08:00
README.md docs: Update linyaps-box documentation 2025-08-20 15:27:24 +08:00
README.zh_CN.md docs: Update linyaps-box documentation 2025-08-20 15:27:24 +08:00
REUSE.toml build: vendoring CLI11 and nlohmann_json 2025-04-01 17:36:48 +08:00

README.md

linyaps-box

 **en** | [zh_CN](./README.zh_CN.md) 

Packaging status

This project is a simple OCI runtime mainly used by linyaps, which is a toolkit for Linux desktop application distributing.

Build

It is recommend to use cmake-presets:

cmake --workflow --preset=dev

License

This project is licensed under LGPL-3.0-or-later.