From a7272e3059c4e97502fd67e338d6ffc9d8424f06 Mon Sep 17 00:00:00 2001 From: Uranium235 Date: Tue, 18 Nov 2014 22:14:07 +0100 Subject: [PATCH] Fix copy-paste mistake --- .../main/java/org/transdroid/core/gui/DetailsFragment.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/transdroid/core/gui/DetailsFragment.java b/app/src/main/java/org/transdroid/core/gui/DetailsFragment.java index b200c8a2..8d2e2d1f 100644 --- a/app/src/main/java/org/transdroid/core/gui/DetailsFragment.java +++ b/app/src/main/java/org/transdroid/core/gui/DetailsFragment.java @@ -474,9 +474,8 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen // Try using a VIEW intent given an ftp:// scheme URI String file = checked.get(0).getRelativePath(); - if (file != null) { - if (file.startsWith("/")) - file = file.substring(1); + if (file != null && file.startsWith("/")) + file = file.substring(1); String url = urlBase + file; Intent simpleStart = new Intent(Intent.ACTION_VIEW, Uri.parse(url)) .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);