Skip to content

Commit

Permalink
Fix --merge behavior when merge is disabled by default
Browse files Browse the repository at this point in the history
  • Loading branch information
mtkennerly committed Oct 29, 2022
1 parent 31529f3 commit f60c59b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@
while the scan was still ongoing.
* GUI: When the manifest finished updating in the background,
any currently open modal would be closed.
* CLI: If you had the merge option disabled and passed `--merge` to override and enable it,
it would be respected for the main `--path` folder, but not for game subfolders.
When Ludusavi detected that a specific game needed a new backup,
that game's subfolder would be cleared out first.
If you had the merge option enabled by default, then this did not affect you.
* CLI mode asked for confirmation when restoring, but backups behaved differently:

* If the target folder did not exist, then the backup would happen without confirmation.
Expand Down
3 changes: 2 additions & 1 deletion src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ pub enum Subcommand {
merge: bool,

/// Don't merge; delete and recreate the target directory.
/// This will delete any existing backups and preempt multi-backup retention.
/// When not specified, this defers to the config file.
#[clap(long, conflicts_with("merge"))]
no_merge: bool,
Expand Down Expand Up @@ -917,7 +918,7 @@ pub fn run_cli(sub: Subcommand) -> Result<(), Error> {
back_up_game(
&scan_info,
layout.game_layout(name),
config.backup.merge,
merge,
&chrono::Utc::now(),
&backup_format,
)
Expand Down

0 comments on commit f60c59b

Please sign in to comment.