Truncate existing file when exporting database
This commit is contained in:
parent
a115bf8cd7
commit
7cd9abb0f6
|
@ -27,7 +27,7 @@ public class DatabaseExporter {
|
|||
ParcelFileDescriptor pfd = null;
|
||||
FileOutputStream fileOutputStream = null;
|
||||
try {
|
||||
pfd = context.getContentResolver().openFileDescriptor(uri, "w");
|
||||
pfd = context.getContentResolver().openFileDescriptor(uri, "wt");
|
||||
fileOutputStream = new FileOutputStream(pfd.getFileDescriptor());
|
||||
exportToStream(fileOutputStream, context);
|
||||
} catch (IOException e) {
|
||||
|
|
Loading…
Reference in New Issue