[almanah] VFS: Avoid to backup DB if file doesn't exists
- From: Álvaro Peña <alvaropg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [almanah] VFS: Avoid to backup DB if file doesn't exists
- Date: Sun, 15 Mar 2015 18:05:20 +0000 (UTC)
commit c5aaa81dfae3ac2794f568aa1bfc61777aba6c62
Author: Álvaro Peña <alvaropg gmail com>
Date: Sun Mar 15 19:00:17 2015 +0100
VFS: Avoid to backup DB if file doesn't exists
src/vfs.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/vfs.c b/src/vfs.c
index d0b0b08..d387c92 100644
--- a/src/vfs.c
+++ b/src/vfs.c
@@ -1012,7 +1012,7 @@ almanah_vfs_open (__attribute__ ((unused)) sqlite3_vfs *pVfs,
}
} else {
/* Make a backup of the plaintext database file */
- if (back_up_file (self->plain_filename) != TRUE) {
+ if (g_file_test (self->encrypted_filename, G_FILE_TEST_IS_REGULAR) == TRUE &&
back_up_file (self->plain_filename) != TRUE) {
/* Translators: the first parameter is a filename. */
g_warning (_("Error backing up file ‘%s’"), self->plain_filename);
g_clear_error (&child_error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]