Add version field to file metadata

This commit is contained in:
Matthias Schiffer 2023-07-30 21:48:58 +02:00
parent 4d6644f427
commit 6077138292
Signed by: neocturne
GPG key ID: 16EF3F64CB201D9C
6 changed files with 26 additions and 8 deletions

View file

@ -72,7 +72,7 @@ impl<'a> RegionProcessor<'a> {
timestamp: SystemTime,
) -> Result<()> {
let output_path = self.config.processed_path(coords);
storage::write(&output_path, processed_region, timestamp)
storage::write(&output_path, processed_region, FILE_META_VERSION, timestamp)
}
fn save_lightmap(
@ -83,6 +83,7 @@ impl<'a> RegionProcessor<'a> {
) -> Result<()> {
fs::create_with_timestamp(
&self.config.tile_path(TileKind::Lightmap, 0, coords),
FILE_META_VERSION,
timestamp,
|file| {
lightmap