mirror of https://github.com/M66B/FairEmail.git
Log insufficient storage space
This commit is contained in:
parent
2e892022ca
commit
c5dfc0b670
|
@ -119,9 +119,19 @@ public class EntityLog {
|
||||||
// Check available storage space
|
// Check available storage space
|
||||||
if (!ok || (++count % LOG_DELETE_BATCH_SIZE) == 0) {
|
if (!ok || (++count % LOG_DELETE_BATCH_SIZE) == 0) {
|
||||||
long cake = Helper.getAvailableStorageSpace();
|
long cake = Helper.getAvailableStorageSpace();
|
||||||
|
boolean wasOk = ok;
|
||||||
ok = (cake < Helper.MIN_REQUIRED_SPACE);
|
ok = (cake < Helper.MIN_REQUIRED_SPACE);
|
||||||
if (!ok)
|
if (!ok)
|
||||||
return;
|
if (wasOk) {
|
||||||
|
entry.type = Type.General;
|
||||||
|
entry.account = null;
|
||||||
|
entry.folder = null;
|
||||||
|
entry.message = null;
|
||||||
|
entry.data = "Insufficient storage space=" +
|
||||||
|
Helper.humanReadableByteCount(cake) + "/" +
|
||||||
|
Helper.humanReadableByteCount(Helper.MIN_REQUIRED_SPACE);
|
||||||
|
} else
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue