@@ -97,6 +97,7 @@ pub enum Event {
97
97
CloudRemoteId ( String ) ,
98
98
CloudPath ( String ) ,
99
99
SortCustomGames ,
100
+ OnlyConstructiveBackups ( bool ) ,
100
101
}
101
102
102
103
/// Settings for `config.yaml`
@@ -1108,6 +1109,8 @@ pub struct BackupConfig {
1108
1109
pub sort : Sort ,
1109
1110
pub retention : Retention ,
1110
1111
pub format : BackupFormats ,
1112
+ /// Don't create a new backup if there are only removed saves and no new/edited ones.
1113
+ pub only_constructive : bool ,
1111
1114
}
1112
1115
1113
1116
#[ derive( Clone , Debug , PartialEq , Eq , serde:: Serialize , serde:: Deserialize , schemars:: JsonSchema ) ]
@@ -1320,6 +1323,7 @@ impl Default for BackupConfig {
1320
1323
sort : Default :: default ( ) ,
1321
1324
retention : Retention :: default ( ) ,
1322
1325
format : Default :: default ( ) ,
1326
+ only_constructive : Default :: default ( ) ,
1323
1327
}
1324
1328
}
1325
1329
}
@@ -2069,6 +2073,7 @@ mod tests {
2069
2073
sort: Default :: default ( ) ,
2070
2074
retention: Retention :: default ( ) ,
2071
2075
format: Default :: default ( ) ,
2076
+ only_constructive: false ,
2072
2077
} ,
2073
2078
restore: RestoreConfig {
2074
2079
path: StrictPath :: relative( s( "~/restore" ) , Some ( StrictPath :: cwd( ) . render( ) ) ) ,
@@ -2120,6 +2125,7 @@ mod tests {
2120
2125
- Backup Game 2
2121
2126
filter:
2122
2127
excludeStoreScreenshots: true
2128
+ onlyConstructive: true
2123
2129
restore:
2124
2130
path: ~/restore
2125
2131
ignoredGames:
@@ -2194,6 +2200,7 @@ mod tests {
2194
2200
sort: Default :: default ( ) ,
2195
2201
retention: Retention :: default ( ) ,
2196
2202
format: Default :: default ( ) ,
2203
+ only_constructive: true ,
2197
2204
} ,
2198
2205
restore: RestoreConfig {
2199
2206
path: StrictPath :: relative( s( "~/restore" ) , Some ( StrictPath :: cwd( ) . render( ) ) ) ,
@@ -2316,6 +2323,7 @@ backup:
2316
2323
level: 6
2317
2324
zstd:
2318
2325
level: 10
2326
+ onlyConstructive: false
2319
2327
restore:
2320
2328
path: ~/restore
2321
2329
ignoredGames:
@@ -2402,6 +2410,7 @@ customGames:
2402
2410
sort: Default :: default ( ) ,
2403
2411
retention: Retention :: default ( ) ,
2404
2412
format: Default :: default ( ) ,
2413
+ only_constructive: false ,
2405
2414
} ,
2406
2415
restore: RestoreConfig {
2407
2416
path: StrictPath :: new( s( "~/restore" ) ) ,
0 commit comments