mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 13:05:25 -05:00
feat: Do not save memory providers as recent entries (#1259)
This commit is contained in:
@@ -15,6 +15,7 @@ namespace hex::plugin::builtin {
|
||||
[[nodiscard]] bool isWritable() const override { return !this->m_readOnly; }
|
||||
[[nodiscard]] bool isResizable() const override { return !this->m_readOnly; }
|
||||
[[nodiscard]] bool isSavable() const override { return this->m_name.empty(); }
|
||||
[[nodiscard]] bool isSavableAsRecent() const override { return false; }
|
||||
|
||||
[[nodiscard]] bool open() override;
|
||||
void close() override { }
|
||||
|
||||
@@ -33,6 +33,9 @@ namespace hex::plugin::builtin::recent {
|
||||
// do not save to recents if the provider is part of a project
|
||||
if (ProjectFile::hasPath()) return;
|
||||
|
||||
// do not save to recents if the provider doesnt want it
|
||||
if (!provider->isSavableAsRecent()) return;
|
||||
|
||||
// The recent provider is saved to every "recent" directory
|
||||
for (const auto &recentPath : fs::getDefaultPaths(fs::ImHexPath::Recent)) {
|
||||
wolv::io::File recentFile(recentPath / fileName, wolv::io::File::Mode::Create);
|
||||
|
||||
Reference in New Issue
Block a user