[tracker] libtracker-db: Check disk space when recreating DB due to corruption



commit 611542e0fa5b91f5b57e0973e3c6040506e4e705
Author: Jürg Billeter <j bitron ch>
Date:   Tue Mar 2 17:07:47 2010 +0100

    libtracker-db: Check disk space when recreating DB due to corruption

 src/libtracker-db/tracker-db-manager.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-db/tracker-db-manager.c b/src/libtracker-db/tracker-db-manager.c
index f2aeb09..f7fb442 100644
--- a/src/libtracker-db/tracker-db-manager.c
+++ b/src/libtracker-db/tracker-db-manager.c
@@ -1512,6 +1512,10 @@ tracker_db_manager_init (TrackerDBManagerFlags  flags,
 				}
 			}
 
+			if (!tracker_file_system_has_enough_space (data_dir, TRACKER_DB_MIN_REQUIRED_SPACE)) {
+				return FALSE;
+			}
+
 			db_recreate_all ();
 			loaded = FALSE;
 		}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]