11use std:: {
22 fs:: { self , create_dir_all, File } ,
3- io:: { self , ErrorKind , Read , Write } ,
3+ io:: { self , Read , Write } ,
44 path:: { Path , PathBuf } ,
5- thread:: sleep,
6- time:: Duration ,
75} ;
86
97use crate :: error:: BackupError ;
108
119use super :: {
12- backup_manager:: BackupHandler , conditions :: Condition , metadata :: GameFile , placeholder:: * ,
10+ backup_manager:: BackupHandler , placeholder:: * ,
1311} ;
14- use database:: { platform :: Platform , GameVersion } ;
12+ use database:: GameVersion ;
1513use log:: { debug, warn} ;
1614use rustix:: path:: Arg ;
1715use tempfile:: tempfile;
@@ -30,7 +28,6 @@ pub fn resolve(meta: &mut CloudSaveMetadata) -> File {
3028 . iter ( )
3129 . find_map ( |p| match p {
3230 super :: conditions:: Condition :: Os ( os) => Some ( os) ,
33- _ => None ,
3431 } )
3532 . cloned ( )
3633 {
@@ -96,7 +93,6 @@ pub fn extract(file: PathBuf) -> Result<(), BackupError> {
9693 . iter ( )
9794 . find_map ( |p| match p {
9895 super :: conditions:: Condition :: Os ( os) => Some ( os) ,
99- _ => None ,
10096 } )
10197 . cloned ( )
10298 {
@@ -218,44 +214,4 @@ pub fn parse_path(
218214
219215 println ! ( "Final line: {:?}" , & s) ;
220216 Ok ( s)
221- }
222-
223- pub fn test ( ) {
224- let mut meta = CloudSaveMetadata {
225- files : vec ! [
226- GameFile {
227- path: String :: from( "<home>/favicon.png" ) ,
228- id: None ,
229- data_type: super :: metadata:: DataType :: File ,
230- tags: Vec :: new( ) ,
231- conditions: vec![ Condition :: Os ( Platform :: Linux ) ] ,
232- } ,
233- GameFile {
234- path: String :: from( "<home>/Documents/Pixel Art" ) ,
235- id: None ,
236- data_type: super :: metadata:: DataType :: File ,
237- tags: Vec :: new( ) ,
238- conditions: vec![ Condition :: Os ( Platform :: Linux ) ] ,
239- } ,
240- ] ,
241- game_version : GameVersion {
242- game_id : String :: new ( ) ,
243- version_name : String :: new ( ) ,
244- platform : Platform :: Linux ,
245- launch_command : String :: new ( ) ,
246- launch_args : Vec :: new ( ) ,
247- launch_command_template : String :: new ( ) ,
248- setup_command : String :: new ( ) ,
249- setup_args : Vec :: new ( ) ,
250- setup_command_template : String :: new ( ) ,
251- only_setup : true ,
252- version_index : 0 ,
253- delta : false ,
254- umu_id_override : None ,
255- } ,
256- save_id : String :: from ( "aaaaaaa" ) ,
257- } ;
258- //resolve(&mut meta);
259-
260- extract ( "save" . into ( ) ) . unwrap ( ) ;
261- }
217+ }
0 commit comments