diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-06-05 04:23:52 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-06-05 04:23:52 +0200 |
commit | bec5f87053759705fb77bae1aa378f2666c7d153 (patch) | |
tree | bd955b9777aa39b207fa161edf19a6609f822909 /src/db | |
parent | 1c99a41a296cda6647edc32437a813f6923cb1d0 (diff) | |
parent | 4e10e30c2f99d552239871aa1b27a08a6c18f1a4 (diff) |
Merge tag 'upstream/0.23.1'
Upstream version 0.23.1
Diffstat (limited to 'src/db')
-rw-r--r-- | src/db/DatabaseTable.vala | 15 | ||||
-rw-r--r-- | src/db/Db.vala | 2 | ||||
-rw-r--r-- | src/db/EventTable.vala | 2 | ||||
-rw-r--r-- | src/db/PhotoTable.vala | 2 | ||||
-rw-r--r-- | src/db/SavedSearchDBTable.vala | 2 | ||||
-rw-r--r-- | src/db/TagTable.vala | 2 | ||||
-rw-r--r-- | src/db/TombstoneTable.vala | 2 | ||||
-rw-r--r-- | src/db/VersionTable.vala | 2 | ||||
-rw-r--r-- | src/db/VideoTable.vala | 2 |
9 files changed, 19 insertions, 12 deletions
diff --git a/src/db/DatabaseTable.vala b/src/db/DatabaseTable.vala index 235ac06..42eac69 100644 --- a/src/db/DatabaseTable.vala +++ b/src/db/DatabaseTable.vala @@ -1,4 +1,4 @@ -/* Copyright 2009-2015 Yorba Foundation +/* Copyright 2016 Software Freedom Conservancy Inc. * * This software is licensed under the GNU LGPL (version 2.1 or later). * See the COPYING file in this distribution. @@ -69,10 +69,17 @@ public abstract class DatabaseTable { db = null; string backup_path = filename + ".bak"; - string cmdline = "cp " + backup_path + " " + filename; - Posix.system(cmdline); - prepare_db(filename); + try { + File src = File.new_for_commandline_arg(backup_path); + File dest = File.new_for_commandline_arg(filename); + src.copy(dest, + FileCopyFlags.OVERWRITE | + FileCopyFlags.ALL_METADATA); + prepare_db(filename); + } catch (Error error) { + AppWindow.panic(_("Unable to restore photo database %s").printf(error.message)); + } } // disable synchronized commits for performance reasons ... this is not vital, hence we diff --git a/src/db/Db.vala b/src/db/Db.vala index c6b69d9..d536b41 100644 --- a/src/db/Db.vala +++ b/src/db/Db.vala @@ -1,4 +1,4 @@ -/* Copyright 2011-2015 Yorba Foundation +/* Copyright 2016 Software Freedom Conservancy Inc. * * This software is licensed under the GNU Lesser General Public License * (version 2.1 or later). See the COPYING file in this distribution. diff --git a/src/db/EventTable.vala b/src/db/EventTable.vala index 04310b8..593d51c 100644 --- a/src/db/EventTable.vala +++ b/src/db/EventTable.vala @@ -1,4 +1,4 @@ -/* Copyright 2011-2015 Yorba Foundation +/* Copyright 2016 Software Freedom Conservancy Inc. * * This software is licensed under the GNU Lesser General Public License * (version 2.1 or later). See the COPYING file in this distribution. diff --git a/src/db/PhotoTable.vala b/src/db/PhotoTable.vala index 21a8d5e..5be08e7 100644 --- a/src/db/PhotoTable.vala +++ b/src/db/PhotoTable.vala @@ -1,4 +1,4 @@ -/* Copyright 2011-2015 Yorba Foundation +/* Copyright 2016 Software Freedom Conservancy Inc. * * This software is licensed under the GNU Lesser General Public License * (version 2.1 or later). See the COPYING file in this distribution. diff --git a/src/db/SavedSearchDBTable.vala b/src/db/SavedSearchDBTable.vala index 9baab4e..93c8237 100644 --- a/src/db/SavedSearchDBTable.vala +++ b/src/db/SavedSearchDBTable.vala @@ -1,4 +1,4 @@ -/* Copyright 2011-2015 Yorba Foundation +/* Copyright 2016 Software Freedom Conservancy Inc. * * This software is licensed under the GNU Lesser General Public License * (version 2.1 or later). See the COPYING file in this distribution. diff --git a/src/db/TagTable.vala b/src/db/TagTable.vala index 05b2daa..d650641 100644 --- a/src/db/TagTable.vala +++ b/src/db/TagTable.vala @@ -1,4 +1,4 @@ -/* Copyright 2011-2015 Yorba Foundation +/* Copyright 2016 Software Freedom Conservancy Inc. * * This software is licensed under the GNU Lesser General Public License * (version 2.1 or later). See the COPYING file in this distribution. diff --git a/src/db/TombstoneTable.vala b/src/db/TombstoneTable.vala index 861cba4..892198f 100644 --- a/src/db/TombstoneTable.vala +++ b/src/db/TombstoneTable.vala @@ -1,4 +1,4 @@ -/* Copyright 2011-2015 Yorba Foundation +/* Copyright 2016 Software Freedom Conservancy Inc. * * This software is licensed under the GNU Lesser General Public License * (version 2.1 or later). See the COPYING file in this distribution. diff --git a/src/db/VersionTable.vala b/src/db/VersionTable.vala index 3711b83..101b8fb 100644 --- a/src/db/VersionTable.vala +++ b/src/db/VersionTable.vala @@ -1,4 +1,4 @@ -/* Copyright 2011-2015 Yorba Foundation +/* Copyright 2016 Software Freedom Conservancy Inc. * * This software is licensed under the GNU Lesser General Public License * (version 2.1 or later). See the COPYING file in this distribution. diff --git a/src/db/VideoTable.vala b/src/db/VideoTable.vala index bd45750..7bd1bb7 100644 --- a/src/db/VideoTable.vala +++ b/src/db/VideoTable.vala @@ -1,4 +1,4 @@ -/* Copyright 2011-2015 Yorba Foundation +/* Copyright 2016 Software Freedom Conservancy Inc. * * This software is licensed under the GNU Lesser General Public License * (version 2.1 or later). See the COPYING file in this distribution. |