diff options
| author | totonii <totonicontato@gmail.com> | 2026-11-22 10:41:32 -0300 |
|---|---|---|
| committer | totonii <totonicontato@gmail.com> | 2026-11-22 10:41:32 -0300 |
| commit | 3f26a95a10a0c807480c66b8ecea9dae690c1677 (patch) | |
| tree | 42510686ca07a3c8902de9273306b93aaef6ff32 /runtime/shims/file_system.cpp | |
| parent | 89b047cd8fab50675a43d76722a6a8a881f55dc2 (diff) | |
fix(file_system): check is_regular_file for deletion markers so nested deletes do not hide parent directories
Diffstat (limited to 'runtime/shims/file_system.cpp')
| -rw-r--r-- | runtime/shims/file_system.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/shims/file_system.cpp b/runtime/shims/file_system.cpp index 38c3194fe..f0ae08811 100644 --- a/runtime/shims/file_system.cpp +++ b/runtime/shims/file_system.cpp | |||
| @@ -142,7 +142,9 @@ std::filesystem::path marker(const std::filesystem::path& overlay, const std::ve | |||
| 142 | bool deleted(const std::filesystem::path& overlay, const std::vector<std::wstring>& parts) { | 142 | bool deleted(const std::filesystem::path& overlay, const std::vector<std::wstring>& parts) { |
| 143 | if (overlay.empty() || parts.empty()) return false; | 143 | if (overlay.empty() || parts.empty()) return false; |
| 144 | std::error_code ec; | 144 | std::error_code ec; |
| 145 | return std::filesystem::exists(marker(overlay, parts), ec); | 145 | // Only regular files are deletion markers; parent directories inside .gta6rt-deleted/ exist only to hold markers |
| 146 | // for nested deleted files and must not hide the corresponding ancestor directories in the package. | ||
| 147 | return std::filesystem::is_regular_file(marker(overlay, parts), ec); | ||
| 146 | } | 148 | } |
| 147 | 149 | ||
| 148 | Target read_target(const std::wstring& path) { | 150 | Target read_target(const std::wstring& path) { |