mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-27 16:10:58 +01:00
Replaced forward raw by download/save raw, fixed saving attachments
This commit is contained in:
@@ -137,6 +137,20 @@ public class JobDaily extends JobService {
|
||||
Log.w("Error deleting " + file);
|
||||
}
|
||||
|
||||
// Cleanup attachment files
|
||||
Log.i("Cleanup raw files");
|
||||
File[] raw = new File(context.getFilesDir(), "raw").listFiles();
|
||||
if (raw != null)
|
||||
for (File file : raw)
|
||||
if (file.isFile()) {
|
||||
long id = Long.parseLong(file.getName());
|
||||
if (db.message().countMessage(id) == 0) {
|
||||
Log.i("Cleanup raw id=" + id);
|
||||
if (!file.delete())
|
||||
Log.w("Error deleting " + file);
|
||||
}
|
||||
}
|
||||
|
||||
Log.i("Cleanup log");
|
||||
long before = now - KEEP_LOG_DURATION;
|
||||
int logs = db.log().deleteLogs(before);
|
||||
|
||||
Reference in New Issue
Block a user