Add support for bucket name in Sia provider #16
This commit is contained in:
		| @@ -36,12 +36,12 @@ template <typename drive> inline void help(std::vector<const char *> args) { | ||||
|   std::cout << "    -di,--drive_information           Display mounted drive " | ||||
|                "information" | ||||
|             << std::endl; | ||||
|   std::cout << "    -s3,--s3                          Enables S3 mode" | ||||
|             << std::endl; | ||||
|   std::cout | ||||
|       << "    -na,--name                        Unique name for S3 or Sia " | ||||
|          "instance [Required]" | ||||
|       << std::endl; | ||||
|   std::cout << "    -s3,--s3                          Enables S3 mode" | ||||
|             << std::endl; | ||||
|   std::cout | ||||
|       << "    -gc,--generate_config             Generate initial configuration" | ||||
|       << std::endl; | ||||
|   | ||||
| @@ -84,10 +84,10 @@ auto main(int argc, char **argv) -> int { | ||||
|                   << std::endl; | ||||
|         res = exit_code::invalid_syntax; | ||||
|       } else { | ||||
|         unique_id = parts[0U] + ':' + parts[1U]; | ||||
|         remote_host = parts[0U]; | ||||
|         unique_id = parts.at(0U) + ':' + parts.at(1U); | ||||
|         remote_host = parts.at(0U); | ||||
|         try { | ||||
|           remote_port = utils::string::to_uint16(parts[1U]); | ||||
|           remote_port = utils::string::to_uint16(parts.at(1U)); | ||||
|           data_directory = utils::path::combine( | ||||
|               data_directory.empty() ? app_config::default_data_directory(prov) | ||||
|                                      : data_directory, | ||||
| @@ -112,7 +112,8 @@ auto main(int argc, char **argv) -> int { | ||||
|     } else if (res == exit_code::success) { | ||||
|       unique_id = utils::string::trim(data); | ||||
|       if (unique_id.empty()) { | ||||
|         std::cerr << "Name of S3 instance not provided" << std::endl; | ||||
|         std::cerr << "Name of " << app_config::get_provider_name(prov) | ||||
|                   << " instance not provided" << std::endl; | ||||
|         res = exit_code::invalid_syntax; | ||||
|       } | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user