[tracker/direct-access: 11/122] libtracker-data: Also delete -shm and -wal files when deleting database
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/direct-access: 11/122] libtracker-data: Also delete -shm and -wal files when deleting database
- Date: Fri, 6 Aug 2010 10:15:01 +0000 (UTC)
commit 8731931bfc70611f6d8f28daea1bf453dd8dc1df
Author: Jürg Billeter <j bitron ch>
Date: Thu Jul 8 11:55:42 2010 +0200
libtracker-data: Also delete -shm and -wal files when deleting database
src/libtracker-data/tracker-db-manager.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-db-manager.c b/src/libtracker-data/tracker-db-manager.c
index c71abeb..73c3d87 100644
--- a/src/libtracker-data/tracker-db-manager.c
+++ b/src/libtracker-data/tracker-db-manager.c
@@ -395,10 +395,20 @@ db_manager_remove_all (gboolean rm_journal)
* calculate the absolute directories here.
*/
for (i = 1; i < G_N_ELEMENTS (dbs); i++) {
+ gchar *filename;
g_message (" Removing database:'%s'",
dbs[i].abs_filename);
g_unlink (dbs[i].abs_filename);
+
+ /* also delete shm and wal helper files */
+ filename = g_strdup_printf ("%s-shm", dbs[i].abs_filename);
+ g_unlink (filename);
+ g_free (filename);
+
+ filename = g_strdup_printf ("%s-wal", dbs[i].abs_filename);
+ g_unlink (filename);
+ g_free (filename);
}
if (rm_journal) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]