diff options
author | 2021-10-08 23:25:56 -0700 | |
---|---|---|
committer | 2021-10-08 23:25:56 -0700 | |
commit | 18ba2096e612101b97204a7449c3c652e7e078aa (patch) | |
tree | 0ce32810ad4ef53f860f87eb54151d8f8ecb1aa8 /src/resolver | |
parent | 7e2c297013e89e26da2db27d7edab886761c203e (diff) | |
download | bun-jarred/improve-testing.tar.gz bun-jarred/improve-testing.tar.zst bun-jarred/improve-testing.zip |
Implement a filesystem for testsjarred/improve-testing
Diffstat (limited to 'src/resolver')
-rw-r--r-- | src/resolver/resolver.zig | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/resolver/resolver.zig b/src/resolver/resolver.zig index 5283ce812..198c11b73 100644 --- a/src/resolver/resolver.zig +++ b/src/resolver/resolver.zig @@ -28,6 +28,7 @@ const Path = Fs.Path; const NodeModuleBundle = @import("../node_module_bundle.zig").NodeModuleBundle; const FileSystem = Fs.FileSystem; +const File = Fs.File; pub fn isPackagePath(path: string) bool { // this could probably be flattened into something more optimized @@ -562,14 +563,14 @@ pub const Resolver = struct { var parts = [_]string{ FileSystem.instance.top_level_dir, std.fs.path.sep_str, route_dir }; const abs = FileSystem.instance.join(&parts); // must end in trailing slash - break :brk (std.os.realpath(abs, &buf) catch continue); + break :brk (File.realpath(abs, &buf) catch continue); } return error.MissingRouteDir; } else { var parts = [_]string{ FileSystem.instance.top_level_dir, std.fs.path.sep_str, pair.router.dir }; const abs = FileSystem.instance.join(&parts); // must end in trailing slash - break :brk std.os.realpath(abs, &buf) catch return error.MissingRouteDir; + break :brk File.realpath(abs, &buf) catch return error.MissingRouteDir; } }; |