| ... | @@ -15,6 +15,8 @@ const base64_decoder = fs.base64_decoder; | ... | @@ -15,6 +15,8 @@ const base64_decoder = fs.base64_decoder; |
| 15 | const BIN_DIGEST_LEN = 48; | 15 | const BIN_DIGEST_LEN = 48; |
| 16 | const BASE64_DIGEST_LEN = base64.Base64Encoder.calcSize(BIN_DIGEST_LEN); | 16 | const BASE64_DIGEST_LEN = base64.Base64Encoder.calcSize(BIN_DIGEST_LEN); |
| 17 | | 17 | |
| | 18 | const MANIFEST_FILE_SIZE_MAX = 50 * 1024 * 1024; |
| | 19 | |
| 18 | pub const File = struct { | 20 | pub const File = struct { |
| 19 | path: ?[]const u8, | 21 | path: ?[]const u8, |
| 20 | stat: fs.File.Stat, | 22 | stat: fs.File.Stat, |
| ... | @@ -150,8 +152,7 @@ pub const CacheHash = struct { | ... | @@ -150,8 +152,7 @@ pub const CacheHash = struct { |
| 150 | }; | 152 | }; |
| 151 | } | 153 | } |
| 152 | | 154 | |
| 153 | // TODO: Figure out a good max value? | 155 | const file_contents = try self.manifest_file.?.inStream().readAllAlloc(self.alloc, MANIFEST_FILE_SIZE_MAX); |
| 154 | const file_contents = try self.manifest_file.?.inStream().readAllAlloc(self.alloc, 16 * 1024); | | |
| 155 | defer self.alloc.free(file_contents); | 156 | defer self.alloc.free(file_contents); |
| 156 | | 157 | |
| 157 | const input_file_count = self.files.items.len; | 158 | const input_file_count = self.files.items.len; |