From 173093d3148445f42ec8ff8f91e648f53b232d46 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 30 Aug 2022 20:46:01 +0000 Subject: [PATCH] Android: correctly check for empty path The comparison against the empty string caused things to error out when only one file was given. Signed-off-by: Dirk Hohndel --- .../org/subsurfacedivelog/mobile/SubsurfaceMobileActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android-mobile/src/org/subsurfacedivelog/mobile/SubsurfaceMobileActivity.java b/android-mobile/src/org/subsurfacedivelog/mobile/SubsurfaceMobileActivity.java index f448d196e..48d1efee8 100644 --- a/android-mobile/src/org/subsurfacedivelog/mobile/SubsurfaceMobileActivity.java +++ b/android-mobile/src/org/subsurfacedivelog/mobile/SubsurfaceMobileActivity.java @@ -70,7 +70,7 @@ public class SubsurfaceMobileActivity extends QtActivity attachments.add(uri); // if there is a second file name (that's for support emails) add it and set this up as support email as well - if (path2 != "") { + if (!path2.isEmpty()) { fileToShare = new File(path2); try { uri = FileProvider.getUriForFile(QtNative.activity(), fileProviderAuthority, fileToShare);