Merge pull request #3845 from fw42/fix_binread
Fix reading of binary metadata file
This commit is contained in:
		
						commit
						48d6eea9b2
					
				|  | @ -130,9 +130,7 @@ module Jekyll | ||||||
|     # |     # | ||||||
|     # Returns nothing. |     # Returns nothing. | ||||||
|     def write_metadata |     def write_metadata | ||||||
|       File.open(metadata_file, 'wb') do |f| |       File.binwrite(metadata_file, Marshal.dump(metadata)) | ||||||
|         f.write(Marshal.dump(metadata)) |  | ||||||
|       end |  | ||||||
|     end |     end | ||||||
| 
 | 
 | ||||||
|     # Produce the absolute path of the metadata file |     # Produce the absolute path of the metadata file | ||||||
|  | @ -158,7 +156,7 @@ module Jekyll | ||||||
|     # Returns the read metadata. |     # Returns the read metadata. | ||||||
|     def read_metadata |     def read_metadata | ||||||
|       @metadata = if !disabled? && File.file?(metadata_file) |       @metadata = if !disabled? && File.file?(metadata_file) | ||||||
|         content = File.read(metadata_file) |         content = File.binread(metadata_file) | ||||||
| 
 | 
 | ||||||
|         begin |         begin | ||||||
|           Marshal.load(content) |           Marshal.load(content) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue