mirror of
https://github.com/wownero/wownero.git
synced 2026-10-17 07:31:35 +02:00
epee: ensure is_file_exist doesn't throw
This commit is contained in:
@@ -63,8 +63,15 @@ namespace file_io_utils
|
|||||||
|
|
||||||
bool is_file_exist(const std::string& path)
|
bool is_file_exist(const std::string& path)
|
||||||
{
|
{
|
||||||
boost::filesystem::path p(path);
|
try
|
||||||
return boost::filesystem::exists(p);
|
{
|
||||||
|
boost::filesystem::path p(path);
|
||||||
|
return boost::filesystem::exists(p);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user