lib/net: Use fs::is_regular_file() to check for path existence
This commit is contained in:
parent
220f9e8274
commit
d033ffa3d8
|
@ -334,11 +334,7 @@ bool SecureSocket::loadCertificates(const std::string& filename)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
std::ifstream file(filename.c_str());
|
if (!barrier::fs::is_regular_file(barrier::fs::u8path(filename))) {
|
||||||
bool exist = file.good();
|
|
||||||
file.close();
|
|
||||||
|
|
||||||
if (!exist) {
|
|
||||||
showError("ssl certificate doesn't exist: " + filename);
|
showError("ssl certificate doesn't exist: " + filename);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue