Zip larger log files only

pull/210/head
M66B 2 years ago
parent 3d70d5aa22
commit 302d201d19

@ -174,6 +174,7 @@ public class Log {
private static final long MAX_LOG_SIZE = 8 * 1024 * 1024L;
private static final int MAX_CRASH_REPORTS = (BuildConfig.TEST_RELEASE ? 50 : 5);
private static final long MIN_FILE_SIZE = 1024 * 1024L;
private static final long MIN_ZIP_SIZE = 1024 * 1024L;
private static final String TAG = "fairemail";
// https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html
@ -2631,7 +2632,7 @@ public class Log {
}
db.attachment().setDownloaded(attachment.id, size);
if (!BuildConfig.DEBUG)
if (!BuildConfig.DEBUG && size > MIN_ZIP_SIZE)
attachment.zip(context);
} catch (Throwable ex) {
Log.e(ex);
@ -2741,7 +2742,7 @@ public class Log {
}
db.attachment().setDownloaded(attachment.id, size);
if (!BuildConfig.DEBUG)
if (!BuildConfig.DEBUG && size > MIN_ZIP_SIZE)
attachment.zip(context);
} finally {
if (proc != null)

Loading…
Cancel
Save