mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Purge bookmarks if they get invalid
This commit is contained in:
parent
34c1849ddc
commit
14a7148bfa
@ -120,10 +120,16 @@ void Bookmarks::save()
|
||||
void BookmarksList::load()
|
||||
{
|
||||
QFile f(YACReader::getSettingsPath() + "/bookmarks.yacr");
|
||||
if (f.open(QIODevice::ReadOnly)) {
|
||||
QDataStream dataS(&f);
|
||||
dataS >> list;
|
||||
try {
|
||||
if (f.open(QIODevice::ReadOnly)) {
|
||||
QDataStream dataS(&f);
|
||||
dataS >> list;
|
||||
f.close();
|
||||
}
|
||||
} catch (const std::exception &e) {
|
||||
f.close();
|
||||
|
||||
f.remove();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user