| ... | @@ -849,10 +849,16 @@ pub fn setWatchInputsFromManifestFiles( | ... | @@ -849,10 +849,16 @@ pub fn setWatchInputsFromManifestFiles( |
| 849 | for (scf.files.keys()) |file_offset| { | 849 | for (scf.files.keys()) |file_offset| { |
| 850 | // The file path data is freed when the cache manifest is cleaned up at the end of `make`. | 850 | // The file path data is freed when the cache manifest is cleaned up at the end of `make`. |
| 851 | const sub_path = try arena.dupe(u8, scf.path(file_offset)); | 851 | const sub_path = try arena.dupe(u8, scf.path(file_offset)); |
| 852 | try addWatchInputFromPath(s, maker, .{ | 852 | const file = file_offset.get(scf.contents.items); |
| 853 | .root_dir = prefixes[file_offset.get(scf.contents.items).flags.prefix], | 853 | const path: Path = .{ |
| 854 | .sub_path = Dir.path.dirname(sub_path) orelse "", | 854 | .root_dir = prefixes[file.flags.prefix], |
| 855 | }, Dir.path.basename(sub_path)); | 855 | .sub_path = sub_path, |
| | 856 | }; |
| | 857 | if (file.flags.is_directory) { |
| | 858 | try addDirectoryWatchInputFromPath(s, maker, path); |
| | 859 | } else { |
| | 860 | try addWatchInputPath(s, maker, path); |
| | 861 | } |
| 856 | } | 862 | } |
| 857 | } | 863 | } |
| 858 | | 864 | |