aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/src/cgeo/geocaching/DataStore.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/DataStore.java b/main/src/cgeo/geocaching/DataStore.java
index c66b653..ba9b133 100644
--- a/main/src/cgeo/geocaching/DataStore.java
+++ b/main/src/cgeo/geocaching/DataStore.java
@@ -2361,6 +2361,10 @@ public class DataStore {
// cleaned. TO BE REMOVED AFTER 2015-03-24.
Log.d("Database clean: removing obsolete log images records");
database.delete(dbTableLogImages, "log_id NOT IN (SELECT _id FROM " + dbTableLogs + ")", null);
+
+ // Try to reclaim unused space by compacting the database.
+ Log.d("Database clean: vacuuming the freed space");
+ database.execSQL("VACUUM");
} catch (final Exception e) {
Log.w("DataStore.clean", e);
}