diff options
| author | Ryan Liptak <squeek502@hotmail.com> | 2023-12-24 04:45:53 -0800 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2024-01-04 17:34:34 +0200 |
| commit | 0527cab71bac6067ceae6a1fb0a0f401a5027607 (patch) | |
| tree | 025db0799e40c1489ce51f68fc28b60d14c45718 /lib/std/Build/Step/ConfigHeader.zig | |
| parent | 9a1608509300fcdf118d82063bbf1481a10ca551 (diff) | |
| download | zig-0527cab71bac6067ceae6a1fb0a0f401a5027607.tar.gz zig-0527cab71bac6067ceae6a1fb0a0f401a5027607.zip | |
Use `std.fs.path.relative` for `@import` and `@embedFile` sub paths
Fixes edge cases where the `startsWith` that was used previously would return a false positive on a resolved path like `foo.zig` when the resolved root was `foo`. Before this commit, such a path would be treated as a sub path of 'foo' with a resolved sub file path of 'zig' (and the `.` would be assumed to be a path separator). After this commit, `foo.zig` will be correctly treated as outside of the root of `foo`.
Closes #18355
Diffstat (limited to 'lib/std/Build/Step/ConfigHeader.zig')
0 files changed, 0 insertions, 0 deletions
