From a24dc147abacaadeb1eb21591a9c0d43d6fa0329 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sat, 26 Mar 2011 08:37:42 +0000 Subject: [PATCH] Sync program preferences before computer shutdown to avoid loss --- src/qtlibtorrent/qbtsession.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qtlibtorrent/qbtsession.cpp b/src/qtlibtorrent/qbtsession.cpp index 296a3f5d1..4c2f781ac 100644 --- a/src/qtlibtorrent/qbtsession.cpp +++ b/src/qtlibtorrent/qbtsession.cpp @@ -2111,6 +2111,8 @@ void QBtSession::readAlerts() { saveSessionState(); qDebug("Saving fast resume data"); saveFastResumeData(); + // Make sure preferences are synced before exiting + pref.sync(); qDebug("Sending computer shutdown/suspend signal"); misc::shutdownComputer(suspend); }