Skip to main content

ensure_dirs

Function ensure_dirs 

Source
pub fn ensure_dirs(paths: &DataPaths) -> Result<(), String>
Expand description

Create every directory the launcher + srv expect to exist. Idempotent. Delegates to the common implementation.

It puts no database in them: what a new version’s data starts from is srv’s to decide, on its first start (crates/srv-core/src/migrations/carry_forward.rs: the newest older version’s databases, else the channel’s pre-versioning data/db/). The launcher used to copy that pre-versioning folder here whenever a version’s data/db/ had no database yet, which is every upgrade: srv then found an objects.db in place and carried nothing forward, so each upgrade started from that old data instead of the previous version’s, without the layout its quit had saved.