mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-09 11:27:53 +00:00
* fix flags on std::ifstream
This commit is contained in:
parent
8949ebf041
commit
b2108ff2d0
@ -129,7 +129,7 @@ namespace client
|
|||||||
{
|
{
|
||||||
int num = 0;
|
int num = 0;
|
||||||
auto filename = GetPath () / "addresses.csv";
|
auto filename = GetPath () / "addresses.csv";
|
||||||
std::ifstream f (filename.string (), std::ofstream::in); // in text mode
|
std::ifstream f (filename.string (), std::ifstream::in); // in text mode
|
||||||
if (f.is_open ())
|
if (f.is_open ())
|
||||||
{
|
{
|
||||||
addresses.clear ();
|
addresses.clear ();
|
||||||
@ -321,7 +321,7 @@ namespace client
|
|||||||
}
|
}
|
||||||
|
|
||||||
// try hosts.txt first
|
// try hosts.txt first
|
||||||
std::ifstream f (i2p::util::filesystem::GetFullPath ("hosts.txt").c_str (), std::ofstream::in); // in text mode
|
std::ifstream f (i2p::util::filesystem::GetFullPath ("hosts.txt").c_str (), std::ifstream::in); // in text mode
|
||||||
if (f.is_open ())
|
if (f.is_open ())
|
||||||
{
|
{
|
||||||
LoadHostsFromStream (f);
|
LoadHostsFromStream (f);
|
||||||
@ -384,7 +384,7 @@ namespace client
|
|||||||
{
|
{
|
||||||
if (!m_Subscriptions.size ())
|
if (!m_Subscriptions.size ())
|
||||||
{
|
{
|
||||||
std::ifstream f (i2p::util::filesystem::GetFullPath ("subscriptions.txt").c_str (), std::ofstream::in); // in text mode
|
std::ifstream f (i2p::util::filesystem::GetFullPath ("subscriptions.txt").c_str (), std::ifstream::in); // in text mode
|
||||||
if (f.is_open ())
|
if (f.is_open ())
|
||||||
{
|
{
|
||||||
std::string s;
|
std::string s;
|
||||||
|
@ -292,7 +292,7 @@ namespace i2p
|
|||||||
|
|
||||||
bool RouterContext::Load ()
|
bool RouterContext::Load ()
|
||||||
{
|
{
|
||||||
std::ifstream fk (i2p::util::filesystem::GetFullPath (ROUTER_KEYS).c_str (), std::ifstream::binary | std::ofstream::in);
|
std::ifstream fk (i2p::util::filesystem::GetFullPath (ROUTER_KEYS).c_str (), std::ifstream::binary | std::ifstream::in);
|
||||||
if (!fk.is_open ()) return false;
|
if (!fk.is_open ()) return false;
|
||||||
fk.seekg (0, std::ios::end);
|
fk.seekg (0, std::ios::end);
|
||||||
size_t len = fk.tellg();
|
size_t len = fk.tellg();
|
||||||
|
Loading…
Reference in New Issue
Block a user