mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 05:27:41 -05:00
impr: Handle read-only files more gracefully
This commit is contained in:
@@ -89,8 +89,12 @@ namespace hex::plugin::builtin {
|
||||
});
|
||||
|
||||
EventProviderOpened::subscribe([](hex::prv::Provider *provider) {
|
||||
if (provider != nullptr && ImHexApi::Provider::get() == provider)
|
||||
if (provider != nullptr && ImHexApi::Provider::get() == provider) {
|
||||
RequestUpdateWindowTitle::post();
|
||||
|
||||
if (!provider->isWritable())
|
||||
ui::ToastInfo::open("hex.builtin.popup.error.read_only"_lang);
|
||||
}
|
||||
});
|
||||
|
||||
RequestOpenFile::subscribe(openFile);
|
||||
|
||||
Reference in New Issue
Block a user