| ... | @@ -14,7 +14,7 @@ const base64_encoder = fs.base64_encoder; | ... | @@ -14,7 +14,7 @@ const base64_encoder = fs.base64_encoder; |
| 14 | const base64_decoder = fs.base64_decoder; | 14 | const base64_decoder = fs.base64_decoder; |
| 15 | const BIN_DIGEST_LEN = 32; | 15 | const BIN_DIGEST_LEN = 32; |
| 16 | | 16 | |
| 17 | pub const CacheHashFile = struct { | 17 | pub const File = struct { |
| 18 | path: ?[]const u8, | 18 | path: ?[]const u8, |
| 19 | stat: fs.File.Stat, | 19 | stat: fs.File.Stat, |
| 20 | file_handle: os.fd_t, | 20 | file_handle: os.fd_t, |
| ... | @@ -41,7 +41,7 @@ pub const CacheHash = struct { | ... | @@ -41,7 +41,7 @@ pub const CacheHash = struct { |
| 41 | manifest_file: ?fs.File, | 41 | manifest_file: ?fs.File, |
| 42 | manifest_dirty: bool, | 42 | manifest_dirty: bool, |
| 43 | force_check_manifest: bool, | 43 | force_check_manifest: bool, |
| 44 | files: ArrayList(CacheHashFile), | 44 | files: ArrayList(File), |
| 45 | b64_digest: ArrayList(u8), | 45 | b64_digest: ArrayList(u8), |
| 46 | | 46 | |
| 47 | pub fn init(alloc: *Allocator, manifest_dir_path: []const u8) !@This() { | 47 | pub fn init(alloc: *Allocator, manifest_dir_path: []const u8) !@This() { |
| ... | @@ -53,7 +53,7 @@ pub const CacheHash = struct { | ... | @@ -53,7 +53,7 @@ pub const CacheHash = struct { |
| 53 | .manifest_file = null, | 53 | .manifest_file = null, |
| 54 | .manifest_dirty = false, | 54 | .manifest_dirty = false, |
| 55 | .force_check_manifest = false, | 55 | .force_check_manifest = false, |
| 56 | .files = ArrayList(CacheHashFile).init(alloc), | 56 | .files = ArrayList(File).init(alloc), |
| 57 | .b64_digest = ArrayList(u8).init(alloc), | 57 | .b64_digest = ArrayList(u8).init(alloc), |
| 58 | }; | 58 | }; |
| 59 | } | 59 | } |
| ... | @@ -147,7 +147,7 @@ pub const CacheHash = struct { | ... | @@ -147,7 +147,7 @@ pub const CacheHash = struct { |
| 147 | while (line_iter.next()) |line| { | 147 | while (line_iter.next()) |line| { |
| 148 | defer idx += 1; | 148 | defer idx += 1; |
| 149 | | 149 | |
| 150 | var cache_hash_file: *CacheHashFile = undefined; | 150 | var cache_hash_file: *File = undefined; |
| 151 | if (idx < input_file_count) { | 151 | if (idx < input_file_count) { |
| 152 | cache_hash_file = self.files.ptrAt(idx); | 152 | cache_hash_file = self.files.ptrAt(idx); |
| 153 | } else { | 153 | } else { |
| ... | @@ -230,7 +230,7 @@ pub const CacheHash = struct { | ... | @@ -230,7 +230,7 @@ pub const CacheHash = struct { |
| 230 | return true; | 230 | return true; |
| 231 | } | 231 | } |
| 232 | | 232 | |
| 233 | pub fn populate_file_hash(self: *@This(), cache_hash_file: *CacheHashFile) !void { | 233 | pub fn populate_file_hash(self: *@This(), cache_hash_file: *File) !void { |
| 234 | debug.assert(cache_hash_file.path != null); | 234 | debug.assert(cache_hash_file.path != null); |
| 235 | | 235 | |
| 236 | const this_file = try fs.cwd().openFile(cache_hash_file.path.?, .{}); | 236 | const this_file = try fs.cwd().openFile(cache_hash_file.path.?, .{}); |