mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 10:58:56 +00:00
* fix: correctly prepend system path to relative urls on `pathToFileURL` The `pathToFileURL` was not handling the case that when a relative link is passed, it should convert it to a absolute url and prepend the top_folder, or otherwise described, resolve the path before creating the url. This does that by calling into buns Path api and using its `resolve` function. Theres the detail that i used preprocessor directives to determine whether we are on windows because there does not seam to be a easy way to get that at runtime in the `BunObject.cpp` file. Fixes: https://github.com/oven-sh/bun/issues/6456 * fix: add issue id to test name * fix: implement changes requested in review * style: fix styling * Update src/bun.js/bindings/BunObject.cpp * Update src/bun.js/bindings/BunObject.cpp * Update src/bun.js/bindings/BunObject.cpp --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>