mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-11 07:17:53 +00:00
print error messages
This commit is contained in:
parent
261219d30f
commit
edbc39f32f
@ -142,6 +142,9 @@ torrent_handle startTorrentUser(std::string const &username, bool following)
|
|||||||
tparams.save_path= torrentPath.string();
|
tparams.save_path= torrentPath.string();
|
||||||
boost::system::error_code ec;
|
boost::system::error_code ec;
|
||||||
boost::filesystem::create_directory(torrentPath, ec);
|
boost::filesystem::create_directory(torrentPath, ec);
|
||||||
|
if (ec) {
|
||||||
|
fprintf(stderr, "failed to create directory '%s': %s\n", torrentPath.string().c_str(), ec.message().c_str());
|
||||||
|
}
|
||||||
std::string filename = combine_path(tparams.save_path, to_hex(ih.to_string()) + ".resume");
|
std::string filename = combine_path(tparams.save_path, to_hex(ih.to_string()) + ".resume");
|
||||||
load_file(filename.c_str(), tparams.resume_data);
|
load_file(filename.c_str(), tparams.resume_data);
|
||||||
|
|
||||||
@ -269,6 +272,9 @@ void ThreadWaitExtIP()
|
|||||||
|
|
||||||
boost::filesystem::path swarmDbPath = GetDataDir() / "swarm" / "db";
|
boost::filesystem::path swarmDbPath = GetDataDir() / "swarm" / "db";
|
||||||
boost::filesystem::create_directories(swarmDbPath, ec);
|
boost::filesystem::create_directories(swarmDbPath, ec);
|
||||||
|
if (ec) {
|
||||||
|
fprintf(stderr, "failed to create directory '%s': %s\n", swarmDbPath.string().c_str(), ec.message().c_str());
|
||||||
|
}
|
||||||
m_swarmDb.reset(new CLevelDB(swarmDbPath.string(), 256*1024, false, false));
|
m_swarmDb.reset(new CLevelDB(swarmDbPath.string(), 256*1024, false, false));
|
||||||
|
|
||||||
int listen_port = GetListenPort() + LIBTORRENT_PORT_OFFSET;
|
int listen_port = GetListenPort() + LIBTORRENT_PORT_OFFSET;
|
||||||
|
Loading…
Reference in New Issue
Block a user