aboutsummaryrefslogtreecommitdiff
path: root/src/resolver/package_json.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-08-21 22:53:25 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-08-21 22:53:25 -0700
commite012efa1243d09fb1de282ac0a1fa6c8b07538a5 (patch)
tree46a3d71fbfd8abccc650554bbb54dcf1415a9a1c /src/resolver/package_json.zig
parent468c22de0e8deff28b4b7f780c640ffe3529343a (diff)
downloadbun-e012efa1243d09fb1de282ac0a1fa6c8b07538a5.tar.gz
bun-e012efa1243d09fb1de282ac0a1fa6c8b07538a5.tar.zst
bun-e012efa1243d09fb1de282ac0a1fa6c8b07538a5.zip
Fix watcher when you move files/dirs around. It'll bust the cache and recreate it (and leak memory)
Former-commit-id: 8faf6127547411c1fdcee9e4e7440825f21ecd99
Diffstat (limited to 'src/resolver/package_json.zig')
-rw-r--r--src/resolver/package_json.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resolver/package_json.zig b/src/resolver/package_json.zig
index fea7fef8a..4b1b9d530 100644
--- a/src/resolver/package_json.zig
+++ b/src/resolver/package_json.zig
@@ -368,7 +368,7 @@ pub const PackageJSON = struct {
// TODO: remove this extra copy
const parts = [_]string{ input_path, "package.json" };
const package_json_path_ = r.fs.abs(&parts);
- const package_json_path = r.fs.filename_store.append(@TypeOf(package_json_path_), package_json_path_) catch unreachable;
+ const package_json_path = r.fs.dirname_store.append(@TypeOf(package_json_path_), package_json_path_) catch unreachable;
const entry = r.caches.fs.readFile(
r.fs,