aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2019-07-03 11:37:35 +0200
committerChristian Schneppe <christian@pix-art.de>2019-07-03 11:37:35 +0200
commite8a4eaf8cd6e6ab3a5b0198060ff968f171d53d9 (patch)
tree3913ebbf1c8815f9082c62eff83cb97c96fa2c9e /src/main/java
parentf2c4eebaf88cc4d6c16609e2a9cbd13a5b5ccf0a (diff)
correct webpreview cache paths
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/de/pixart/messenger/services/XmppConnectionService.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
index 7fabd1806..410058d58 100644
--- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
+++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
@@ -792,12 +792,11 @@ public class XmppConnectionService extends Service {
}
private void deleteWebpreviewCache() {
- long start = SystemClock.elapsedRealtime();
try {
- final String path = getApplicationContext().getCacheDir() + File.separator + RICH_LINK_METADATA;
+ long start = SystemClock.elapsedRealtime();
final Calendar time = Calendar.getInstance();
time.add(Calendar.DAY_OF_YEAR, -7);
- final File directory = new File(path);
+ final File directory = new File(getCacheDir().getAbsolutePath(), File.separator + RICH_LINK_METADATA);
if (!directory.exists()) {
return;
}
@@ -814,7 +813,7 @@ public class XmppConnectionService extends Service {
Log.d(Config.LOGTAG, "Deleted " + count + " expired webpreview cache files in " + (SystemClock.elapsedRealtime() - start) + "ms");
}
} catch (Exception e) {
- Log.d(Config.LOGTAG, "Deleted no expired webpreview cache files because of " + e + " in " + (SystemClock.elapsedRealtime() - start) + "ms");
+ Log.d(Config.LOGTAG, "Deleted no expired webpreview cache files because of " + e);
}
}