Files
eden/src/common
Feng Chen c3f1e6562b [common/fs] Preserve Windows roots during path sanitization (#4437)
Commit 5b4c29b123 made SanitizePath rebuild paths from split components after resolving traversal. That reconstruction retained only one leading separator, collapsing UNC paths and breaking network-backed directories.

Parse the path root separately from normal components. Preserve UNC prefixes, drive-absolute and drive-relative forms, and extended UNC/device namespaces while normalizing separators and dot components.

Treat the UNC server/share portion as part of the root so parent traversal cannot escape into another share. Also preserve root-only results such as / and C:\\ instead of stripping their final separator.

- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md)
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.

-------------------

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4437
Reviewed-by: lizzie <lizzie@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
2026-09-16 22:12:01 +02:00
..
2025-11-30 06:04:36 +01:00
2023-01-29 17:49:42 -07:00
2022-10-06 21:00:53 +02:00
2022-04-28 18:24:11 +02:00
2022-04-28 18:24:11 +02:00
2023-01-29 17:49:42 -07:00
2022-07-27 12:53:49 +02:00
2025-04-10 01:11:22 +02:00
2025-09-21 21:58:59 +02:00
2024-02-19 16:00:46 +01:00
2024-01-15 23:26:53 +00:00
2024-02-17 12:32:33 -05:00
2023-11-25 00:47:35 -05:00
2026-06-04 05:49:07 +02:00
2025-09-21 21:58:59 +02:00