File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,10 @@ impl Database {
5959 }
6060
6161 pub fn set_active_database ( & mut self , path : String ) -> Result < ( ) , Box < dyn Error > > {
62+ let path = match util:: find_sqlite_file ( & path) {
63+ Ok ( new_path) => new_path,
64+ Err ( _) => path,
65+ } ;
6266 println ! ( "[NAVIGRAPH] Setting active database to {}" , path) ;
6367 self . close_connection ( ) ;
6468 if util:: is_sqlite_file ( & path) ? {
Original file line number Diff line number Diff line change @@ -137,10 +137,7 @@ impl<'a> Dispatcher<'a> {
137137
138138 fn set_database_if_exists ( & mut self , path : & str ) -> Result < ( ) , Box < dyn Error > > {
139139 if path_exists ( & Path :: new ( path) ) {
140- let sqlite_path = navigation_database:: util:: find_sqlite_file ( path) ?;
141- self . database . set_active_database ( sqlite_path) ?;
142-
143- Ok ( ( ) )
140+ self . database . set_active_database ( path. to_owned ( ) )
144141 } else {
145142 Err ( "Path does not exist" . into ( ) )
146143 }
You can’t perform that action at this time.
0 commit comments