From 150c576661fc8fbd6743fea3e8b6887a1a0681ba Mon Sep 17 00:00:00 2001 From: David Rosca Date: Thu, 11 Jan 2018 19:09:25 +0100 Subject: [PATCH] Bookmarks: Don't try to write to file if open failed --- src/lib/bookmarks/bookmarks.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/bookmarks/bookmarks.cpp b/src/lib/bookmarks/bookmarks.cpp index 56768dfb5..f0499569e 100644 --- a/src/lib/bookmarks/bookmarks.cpp +++ b/src/lib/bookmarks/bookmarks.cpp @@ -1,6 +1,6 @@ /* ============================================================ * Falkon - Qt web browser -* Copyright (C) 2010-2017 David Rosca +* Copyright (C) 2010-2018 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -294,9 +294,9 @@ void Bookmarks::saveBookmarks() } QSaveFile file(DataPaths::currentProfilePath() + QLatin1String("/bookmarks.json")); - if (!file.open(QFile::WriteOnly)) { qWarning() << "Bookmarks::saveBookmarks() Error opening bookmarks file for writing!"; + return; } file.write(data);