org.gamecult.cultlib 2.0.0: the parser's comment and the flush bullet state the exact stamp rule; declare the nil-stamp refusal (Soul s5)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
3994f5d4c6
commit
ef45e4ed82
2 changed files with 6 additions and 3 deletions
|
|
@ -183,8 +183,9 @@ public static class CultDocumentMessagePackSerialization
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parses a store snapshot of any format stamp, as every release has. It judges nothing about readability: a store
|
||||
/// reading its own file checks the stamp against the formats it reads, before the body is parsed.
|
||||
/// Parses a store snapshot whose format stamp is a string, of any version. It refuses a nil or binary stamp
|
||||
/// (1.0.61 read a nil stamp as v1). A store reading its own file checks the stamp against the formats it reads,
|
||||
/// before the body is parsed.
|
||||
/// </summary>
|
||||
public static CultPersistedStoreSnapshot DeserializeSnapshot(byte[] payload) =>
|
||||
DeserializeSnapshot(payload, _ => { });
|
||||
|
|
|
|||
|
|
@ -106,7 +106,9 @@ All notable changes to this package are documented in this file.
|
|||
`cultcache.store.v<N>` with N > 4 (it threw `InvalidOperationException`). A flush
|
||||
rewrites any file whose stamp it can read as v1 or v2, or cannot read at all (empty,
|
||||
truncated, not a snapshot), which includes a v1 file whose body is corrupt or truncated.
|
||||
It refuses a recognised newer stamp, and it refuses an I/O failure on the read.
|
||||
It refuses any other string stamp, a nil or binary stamp, and an I/O failure on the read.
|
||||
The public `DeserializeSnapshot(byte[])` still parses any string stamp, but refuses a nil
|
||||
or binary stamp (1.0.61 read a nil stamp as v1).
|
||||
- `CultMesh.WriteSingleFileDocument` and `WriteSingleFileDocumentPayload` read the
|
||||
file they replace, under the store's `<path>.lock`, and refuse (without touching
|
||||
it) a file this runtime cannot read, a store stamped with a newer format version,
|
||||
|
|
|
|||
Loading…
Reference in a new issue