File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed
Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -472,6 +472,7 @@ pub fn make_import_json(
472472 size: meta_path. metadata( ) ?. len( ) ,
473473 md5_sum: get_md5( meta_path) ?,
474474 description: None ,
475+ is_primary: None ,
475476 } ] ;
476477
477478 for ( file_type, filename) in & [
@@ -486,6 +487,7 @@ pub fn make_import_json(
486487 size : local_path. metadata ( ) ?. len ( ) ,
487488 md5_sum : get_md5 ( & local_path) ?,
488489 description : None ,
490+ is_primary : Some ( true ) ,
489491 } )
490492 }
491493
@@ -505,6 +507,7 @@ pub fn make_import_json(
505507 size : path. metadata ( ) ?. len ( ) ,
506508 md5_sum,
507509 description : file. description . clone ( ) ,
510+ is_primary : None ,
508511 } )
509512 }
510513 }
@@ -527,6 +530,7 @@ pub fn make_import_json(
527530 size : path. metadata ( ) ?. len ( ) ,
528531 md5_sum : get_md5 ( path) ?,
529532 description : None ,
533+ is_primary : None ,
530534 } )
531535 }
532536
Original file line number Diff line number Diff line change @@ -414,18 +414,19 @@ pub struct ExportSimulation {
414414#[ derive( Debug , Clone , Deserialize , Serialize ) ]
415415pub struct MdFile {
416416 pub name : String ,
417+
417418 pub file_type : String ,
419+
418420 pub size : u64 ,
421+
419422 pub md5_sum : String ,
423+
424+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
420425 pub description : Option < String > ,
421- }
422426
423- // --------------------------------------------------
424- //#[derive(Debug)]
425- //pub struct Import {
426- // pub dirname: PathBuf,
427- // pub import_json: PathBuf,
428- //}
427+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
428+ pub is_primary : Option < bool > ,
429+ }
429430
430431// --------------------------------------------------
431432#[ derive( Debug , Deserialize , Serialize ) ]
You can’t perform that action at this time.
0 commit comments