From 7fde0426d43686a5e5fcb6c7780f5f302cb91443 Mon Sep 17 00:00:00 2001 From: johndebord Date: Wed, 22 Jan 2020 17:00:53 -0500 Subject: [PATCH 1/3] Preemptively create wallet directory --- libraries/eos-vm | 2 +- plugins/wallet_plugin/wallet_plugin.cpp | 7 ++++--- programs/keosd/main.cpp | 10 ++++++++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/libraries/eos-vm b/libraries/eos-vm index c5afecd4705..4d2b046ad67 160000 --- a/libraries/eos-vm +++ b/libraries/eos-vm @@ -1 +1 @@ -Subproject commit c5afecd4705317e28d97eb0d950dc50ea1bb58c7 +Subproject commit 4d2b046ad672e0de9ed7a3461fa2bff91b10e57e diff --git a/plugins/wallet_plugin/wallet_plugin.cpp b/plugins/wallet_plugin/wallet_plugin.cpp index 1b1d6aa602b..519e8bbb922 100644 --- a/plugins/wallet_plugin/wallet_plugin.cpp +++ b/plugins/wallet_plugin/wallet_plugin.cpp @@ -42,9 +42,10 @@ void wallet_plugin::plugin_initialize(const variables_map& options) { if (options.count("wallet-dir")) { auto dir = options.at("wallet-dir").as(); if (dir.is_relative()) - wallet_manager_ptr->set_dir(app().data_dir() / dir); - else - wallet_manager_ptr->set_dir(dir); + dir = app().data_dir() / dir; + if( !bfs::exists(dir) ) + bfs::create_directories(dir); + wallet_manager_ptr->set_dir(dir); } if (options.count("unlock-timeout")) { auto timeout = options.at("unlock-timeout").as(); diff --git a/programs/keosd/main.cpp b/programs/keosd/main.cpp index ce1138014a8..24f26ba31e5 100644 --- a/programs/keosd/main.cpp +++ b/programs/keosd/main.cpp @@ -26,8 +26,9 @@ bfs::path determine_home_directory() else { home = getenv("HOME"); } - if(home.empty()) + if(home.empty()) { home = "./"; + } return home; } @@ -44,8 +45,13 @@ int main(int argc, char** argv) .default_http_port = 0 }); app().register_plugin(); - if(!app().initialize(argc, argv)) + if(!app().initialize(argc, argv)) { + const auto& opts = app().get_options(); + if( opts.count("help") || opts.count("version") || opts.count("full-version") || opts.count("print-default-config") ) { + return 0; + } return -1; + } auto& http = app().get_plugin(); http.add_handler("/v1/" + keosd::config::key_store_executable_name + "/stop", [&a=app()](string, string, url_response_callback cb) { cb(200, fc::variant(fc::variant_object())); a.quit(); } ); app().startup(); From cb6534ac7ebdc3dcdb27e2a06d52ed1273048578 Mon Sep 17 00:00:00 2001 From: johndebord Date: Wed, 22 Jan 2020 17:15:53 -0500 Subject: [PATCH 2/3] Revert submodule --- libraries/eos-vm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/eos-vm b/libraries/eos-vm index 4d2b046ad67..b5d15a7de10 160000 --- a/libraries/eos-vm +++ b/libraries/eos-vm @@ -1 +1 @@ -Subproject commit 4d2b046ad672e0de9ed7a3461fa2bff91b10e57e +Subproject commit b5d15a7de109d97a129c953cef7afb81ed1b1a55 From d4e05fd75e817bb3fb13c236799b2ea96867c8c6 Mon Sep 17 00:00:00 2001 From: johndebord Date: Wed, 22 Jan 2020 17:23:15 -0500 Subject: [PATCH 3/3] Revert eos-vm --- libraries/eos-vm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/eos-vm b/libraries/eos-vm index b5d15a7de10..c5afecd4705 160000 --- a/libraries/eos-vm +++ b/libraries/eos-vm @@ -1 +1 @@ -Subproject commit b5d15a7de109d97a129c953cef7afb81ed1b1a55 +Subproject commit c5afecd4705317e28d97eb0d950dc50ea1bb58c7