File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ fn main() {
3232 opts. optopt ( "" , "port" , "port to listent to" , "PORT" ) ;
3333 opts. optopt ( "" , "dbpath" , "path to database" , "PATH" ) ;
3434
35+ opts. optflag ( "" , "no-legacy-import" , "don't import from aw-server-python" ) ;
36+
3537 let matches = match opts. parse ( & args[ 1 ..] ) {
3638 Ok ( m) => m,
3739 Err ( f) => panic ! ( "{}" , f. to_string( ) ) ,
@@ -76,10 +78,12 @@ fn main() {
7678 let asset_path = get_asset_path ( ) ;
7779 info ! ( "Using aw-webui assets at path {:?}" , asset_path) ;
7880
81+ let legacy_import = !matches. opt_present ( "no-legacy-import" ) ;
82+
7983 let server_state = endpoints:: ServerState {
8084 // Even if legacy_import is set to true it is disabled on Android so
8185 // it will not happen there
82- datastore : Mutex :: new ( aw_datastore:: Datastore :: new ( db_path, true ) ) ,
86+ datastore : Mutex :: new ( aw_datastore:: Datastore :: new ( db_path, legacy_import ) ) ,
8387 asset_path,
8488 device_id : device_id:: get_device_id ( ) ,
8589 } ;
You can’t perform that action at this time.
0 commit comments