Fix incorrect fd usage

This commit is contained in:
Dylan Conway
2023-05-08 22:54:25 -07:00
parent 0b52f9210a
commit aa85d7af92

View File

@@ -973,8 +973,10 @@ pub const Resolver = struct {
bun.openFileForPath(span);
if (!store_fd) {
out = try bun.getFdPath(query.entry.cache.fd, &buf);
std.debug.assert(file.handle > 2);
out = try bun.getFdPath(file.handle, &buf);
file.close();
query.entry.cache.fd = 0;
} else {
query.entry.cache.fd = file.handle;
Fs.FileSystem.setMaxFd(file.handle);