mirror of https://github.com/WerWolv/ImHex.git
parent
39276e123e
commit
4ad66365d0
|
@ -193,12 +193,16 @@ namespace hex::plugin::builtin {
|
||||||
this->m_readable = true;
|
this->m_readable = true;
|
||||||
this->m_writable = true;
|
this->m_writable = true;
|
||||||
|
|
||||||
wolv::io::File file(this->m_path, wolv::io::File::Mode::Read);
|
wolv::io::File file(this->m_path, wolv::io::File::Mode::Write);
|
||||||
if (!file.isValid()) {
|
if (!file.isValid()) {
|
||||||
this->m_writable = false;
|
this->m_writable = false;
|
||||||
this->m_readable = false;
|
|
||||||
this->setErrorMessage(hex::format("hex.builtin.provider.file.error.open"_lang, this->m_path.string(), ::strerror(errno)));
|
file = wolv::io::File(this->m_path, wolv::io::File::Mode::Read);
|
||||||
return false;
|
if (!file.isValid()) {
|
||||||
|
this->m_readable = false;
|
||||||
|
this->setErrorMessage(hex::format("hex.builtin.provider.file.error.open"_lang, this->m_path.string(), ::strerror(errno)));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this->m_fileStats = file.getFileInfo();
|
this->m_fileStats = file.getFileInfo();
|
||||||
|
|
Loading…
Reference in New Issue