IgnoreFiles: Fix the socket API would not load the new custom ignored files #3496
authorOlivier Goffart <ogoffart@woboq.com>
Tue, 27 Oct 2015 15:07:59 +0000 (16:07 +0100)
committerOlivier Goffart <ogoffart@woboq.com>
Tue, 27 Oct 2015 15:07:59 +0000 (16:07 +0100)
We did not flush or closed the file after having modified it from the UI.
So when the socket api was reloading it, it wouldn't be able to load
the newly added rules

src/gui/ignorelisteditor.cpp

index b172bd3b264adea33bdc5edb7b077714530f72b2..7b5acd15867dbfb185e9f97cae6a36a9238433a4 100644 (file)
@@ -110,6 +110,7 @@ void IgnoreListEditor::slotUpdateLocalIgnoreList()
         QMessageBox::warning(this, tr("Could not open file"),
                              tr("Cannot write changes to '%1'.").arg(ignoreFile));
     }
+    ignores.close(); //close the file before reloading stuff.
 
     FolderMan * folderMan = FolderMan::instance();