# # # patch "app_state.cc" # from [32d24504144e4143053f8811975f6b67a9b9760b] # to [ab42ce782bb39f6f9895c8d652afe9740d335655] # # patch "work.cc" # from [d41a380cccbc780d79eb1858538c83707c0f8c50] # to [41df6f494d79a898e059be316eff416368a29ceb] # # patch "work.hh" # from [748850ae6613cb42c0c9c0c9f8f2b3728e35e8c5] # to [aef7dfdf6b6cd9c99761561c3483e6182305f6ee] # ============================================================ --- app_state.cc 32d24504144e4143053f8811975f6b67a9b9760b +++ app_state.cc ab42ce782bb39f6f9895c8d652afe9740d335655 @@ -188,17 +188,20 @@ app_state::set_database(system_path cons { if (!filename.empty()) { - system_path database_option(filename); - branch_name branch_option; - rsa_keypair_id key_option; - system_path keydir_option; + db.set_filename(filename); - db.set_filename(filename); + if (found_workspace) + { + system_path database_option(filename); + branch_name branch_option; + rsa_keypair_id key_option; + system_path keydir_option; - work.set_ws_options(database_option, branch_option, + work.set_ws_options(database_option, branch_option, key_option, keydir_option); + } } - } +} void app_state::set_key_dir(system_path const & filename) ============================================================ --- work.cc d41a380cccbc780d79eb1858538c83707c0f8c50 +++ work.cc 41df6f494d79a898e059be316eff416368a29ceb @@ -61,7 +61,7 @@ static void } static void -get_options_path(system_path & workspace, system_path & o_path) +get_options_path(system_path const & workspace, system_path & o_path) { o_path = workspace / bookkeeping_root.as_internal() / options_file_name; L(FL("options path is %s") % o_path); @@ -241,7 +241,7 @@ bool } bool -workspace::get_ws_options_from_path(system_path & workspace, +workspace::get_ws_options_from_path(system_path const & workspace, system_path & database_option, branch_name & branch_option, rsa_keypair_id & key_option, ============================================================ --- work.hh 748850ae6613cb42c0c9c0c9f8f2b3728e35e8c5 +++ work.hh aef7dfdf6b6cd9c99761561c3483e6182305f6ee @@ -157,7 +157,7 @@ struct workspace // implied unless overridden on the command line. the set of valid keys // corresponds exactly to the argument list of these functions. - static bool get_ws_options_from_path(system_path & workspace, + static bool get_ws_options_from_path(system_path const & workspace, system_path & database_option, branch_name & branch_option, rsa_keypair_id & key_option,