Merge lp:~ivaldi/midori/tabby-clean-db-check into lp:midori

Proposed by André Stösel
Status: Merged
Approved by: Paweł Forysiuk
Approved revision: 6392
Merged at revision: 6394
Proposed branch: lp:~ivaldi/midori/tabby-clean-db-check
Merge into: lp:midori
Diff against target: 21 lines (+2/-2)
1 file modified
extensions/tabby.vala (+2/-2)
To merge this branch: bzr merge lp:~ivaldi/midori/tabby-clean-db-check
Reviewer Review Type Date Requested Status
Paweł Forysiuk Approve
Review via email: mp+184565@code.launchpad.net

Commit message

fix check for new database

To post a comment you must log in.
Revision history for this message
Paweł Forysiuk (tuxator) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'extensions/tabby.vala'
2--- extensions/tabby.vala 2013-09-09 12:20:46 +0000
3+++ extensions/tabby.vala 2013-09-09 12:50:36 +0000
4@@ -325,7 +325,7 @@
5
6 string db_path = Midori.Paths.get_config_filename_for_writing ("tabby.db");
7
8- /* FixMe: why does GLib.FileUtils.test(db_path, GLib.FileTest.EXISTS); randomly work or not? */
9+ bool db_exists = GLib.FileUtils.test(db_path, GLib.FileTest.EXISTS);
10
11 if (Sqlite.Database.open_v2 (db_path, out this.db) != Sqlite.OK)
12 critical (_("Failed to open stored session: %s"), db.errmsg);
13@@ -339,7 +339,7 @@
14 if (success && schema != null)
15 if (this.db.exec (schema) != Sqlite.OK)
16 critical (_("Failed to execute database schema: %s"), filename);
17- else {
18+ else if (db_exists == false) {
19 string config_file = Midori.Paths.get_config_filename_for_reading ("session.xbel");
20 try {
21 Katze.Array old_session = new Katze.Array (typeof (Katze.Item));

Subscribers

People subscribed via source and target branches

to all changes: