mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
use cacheDir if externalCacheDir is not available
This commit is contained in:
@@ -201,8 +201,13 @@ public class PersistentBlobProvider {
|
||||
}
|
||||
|
||||
private static @NonNull File getExternalDir(Context context) throws IOException {
|
||||
final File externalDir = context.getExternalCacheDir();
|
||||
if (externalDir == null) throw new IOException("no external files directory");
|
||||
File externalDir = context.getExternalCacheDir();
|
||||
if (externalDir==null) {
|
||||
externalDir = context.getCacheDir();
|
||||
}
|
||||
if (externalDir == null) {
|
||||
throw new IOException("no external files directory");
|
||||
}
|
||||
return externalDir;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user