For each file to be downloaded:
The client manifest entry is deleted and the client manifest is saved. This ensures that a crash does not result in a manifest inaccurately stating that a partially downloaded file exists with a digest hash.
The file is downloaded from the server archive to its corresponding location in the client archive.
The server manifest entry is copied to the client manifest and the client manifest is saved again.
After the files are downloaded, the main attributes of the server manifest are copied to the client manifest on each connection attempt, regardless of whether any files are downloaded or not. Because files are never removed from the client side, a single client can work with servers whose manifests have a common superset of files, without constant removal and re-updating of files.