Skip to main content

recover

Function recover 

Source
pub(crate) fn recover(channel_dir: &Path) -> Result<()>
Expand description

Restores a channel folder left half-done by an interrupted run.

A leftover staging folder is deleted. A leftover old folder is deleted when the channel folder exists (the swap finished), or renamed back when it does not (the swap was interrupted between the two renames).

§Arguments

  • channel_dir - The ch<NN> folder.

§Errors

Returns an error if a folder cannot be removed or renamed.