restore: Fix restoring of empty files

This commit is contained in:
Alexander Weiss 2023-03-23 11:59:05 +01:00
parent 89651b3bd6
commit 41c9b2f5e6
2 changed files with 3 additions and 2 deletions

View File

@ -5,6 +5,7 @@ Breaking changes:
- Backing up multiple sources on the command line now results in one instead of several snapshots.
Bugs fixed:
- `restore` command did not restore empty files. This is fixed.
- `config` command did save the config file compressed which violates the repo design. This is fixed.
New features:

View File

@ -586,8 +586,8 @@ impl FileInfos {
match (has_unmatched, open_file.is_some()) {
(true, true) => Ok(AddFileResult::Modify(file_pos)),
(true, false) => Ok(AddFileResult::New(file_pos)),
(false, _) => Ok(AddFileResult::Verified),
(false, true) => Ok(AddFileResult::Verified),
(_, false) => Ok(AddFileResult::New(file_pos)),
}
}