mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 11:42:16 -05:00
Avoid NullPointerException reported via Google Play
This commit is contained in:
parent
bd4b7d3664
commit
5c93f105ea
@ -772,11 +772,13 @@ public class LocalStore extends Store implements Serializable {
|
||||
public Long doDbWork(final SQLiteDatabase db) {
|
||||
final File[] files = attachmentDirectory.listFiles();
|
||||
long attachmentLength = 0;
|
||||
if (files != null) {
|
||||
for (File file : files) {
|
||||
if (file.exists()) {
|
||||
attachmentLength += file.length();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final File dbFile = storageManager.getDatabase(uUid, database.getStorageProviderId());
|
||||
return dbFile.length() + attachmentLength;
|
||||
|
Loading…
Reference in New Issue
Block a user