Skip to content

Commit

Permalink
Fix crash when sending dataset which include sidecar files
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Jan 14, 2024
1 parent 5407145 commit ac8b31c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions platform/android/src/ch/opengis/qfield/QFieldActivity.java
Expand Up @@ -714,6 +714,8 @@ private void triggerUpdateProjectFromArchive(String path) {
}

private void sendDatasetTo(String paths) {
showBlockingProgressDialog(getString(R.string.processing_message));

executorService.execute(new Runnable() {
@Override
public void run() {
Expand All @@ -722,8 +724,6 @@ public void run() {
if (filePaths.length == 1) {
file = new File(paths);
} else {
showBlockingProgressDialog(
getString(R.string.processing_message));
File temporaryFile = new File(filePaths[0]);
file = new File(getCacheDir(),
temporaryFile.getName() + ".zip");
Expand All @@ -742,8 +742,9 @@ public void run() {
return;
}
}

DocumentFile documentFile = DocumentFile.fromFile(file);
dismissBlockingProgressDialog();

Context context = getApplication().getApplicationContext();
Intent intent = new Intent(Intent.ACTION_SEND);
intent.putExtra(Intent.EXTRA_STREAM,
Expand Down

1 comment on commit ac8b31c

@qfield-fairy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.