Ryan Liptak 020105d0dd Cache: Fix findPrefix when paths are slightly out of the ordinary
This makes Cache.findPrefix/findPrefixResolved use `std.fs.path.relative` instead of `std.mem.startsWith` when checking if a file is within a prefix. This fixes multiple edge cases around prefix detection:

- If a prefix path ended with a path separator, then the first character of the 'sub_path' would get cut off because the previous implementation assumed it was a path separator. Example: prefix: `/foo/`, file_path: `/foo/abc.txt` would see that they both start with `/foo/` and then slice starting from one byte past the common prefix, ending up with `bc.txt` instead of the expected `abc.txt`
- If a prefix contained double path separators after any component, then the `startsWith` check would erroneously fail. Example: prefix: `/foo//bar`, file_path: `/foo/bar/abc.txt` would not see that abc.txt is a sub path of the prefix `/foo//bar`
- On Windows, case insensitivity was not respected at all, instead the UTF-8 bytes were compared directly

This fixes all of the things in the above list (and possibly more).
2023-08-19 22:32:24 -07:00
..
2023-08-15 17:29:35 -04:00
2023-08-18 18:07:16 -07:00
2023-08-18 18:07:16 -07:00
2023-07-16 18:32:52 -07:00
2023-04-22 13:09:15 +03:00
2023-07-31 03:49:21 -04:00
2023-07-31 10:51:44 -07:00
2023-06-25 14:51:03 -07:00
2023-06-10 20:42:30 -07:00
2023-08-06 18:12:05 +02:00
2023-07-07 11:57:09 -07:00