mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-01 09:16:00 +00:00
ROOM temp dir
This commit is contained in:
parent
715dd2c36a
commit
aaafe78bef
2 changed files with 3 additions and 3 deletions
|
@ -206,8 +206,8 @@ class SQLiteCopyOpenHelper implements SupportSQLiteOpenHelper, DelegatingOpenHel
|
|||
|
||||
// An intermediate file is used so that we never end up with a half-copied database file
|
||||
// in the internal directory.
|
||||
File intermediateFile = File.createTempFile(
|
||||
"room-copy-helper", ".tmp", mContext.getCacheDir());
|
||||
File dir = eu.faircode.email.Helper.ensureExists(new File(mContext.getFilesDir(), "shared"));
|
||||
File intermediateFile = new File(dir,"room-copy-helper.tmp");
|
||||
intermediateFile.deleteOnExit();
|
||||
FileChannel output = new FileOutputStream(intermediateFile).getChannel();
|
||||
FileUtil.copy(input, output);
|
||||
|
|
|
@ -2633,7 +2633,7 @@ public class Helper {
|
|||
|
||||
private static final Map<File, Boolean> exists = new HashMap<>();
|
||||
|
||||
static File ensureExists(File dir) {
|
||||
public static File ensureExists(File dir) {
|
||||
synchronized (exists) {
|
||||
if (exists.containsKey(dir))
|
||||
return dir;
|
||||
|
|
Loading…
Reference in a new issue