feat: Do not save memory providers as recent entries (#1259)

This commit is contained in:
iTrooz
2023-08-25 15:35:15 +02:00
committed by GitHub
parent a1dc979217
commit 175e66a60e
3 changed files with 10 additions and 0 deletions

View File

@@ -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);