[tor-commits] [orbot/master] Small bug with deleting unconfigured v3s
n8fr8 at torproject.org
n8fr8 at torproject.org
Wed Dec 22 21:55:11 UTC 2021
commit 06e2b8d4856e5ae1c3ae5abd4906e4c36da54341
Author: b <dsnake at protonmail.com>
Date: Tue Dec 21 16:43:40 2021 -0500
Small bug with deleting unconfigured v3s
---
.../android/ui/v3onionservice/OnionServiceDeleteDialogFragment.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/app/src/main/java/org/torproject/android/ui/v3onionservice/OnionServiceDeleteDialogFragment.java b/app/src/main/java/org/torproject/android/ui/v3onionservice/OnionServiceDeleteDialogFragment.java
index 1606c2e4..07c5764f 100644
--- a/app/src/main/java/org/torproject/android/ui/v3onionservice/OnionServiceDeleteDialogFragment.java
+++ b/app/src/main/java/org/torproject/android/ui/v3onionservice/OnionServiceDeleteDialogFragment.java
@@ -34,7 +34,9 @@ public class OnionServiceDeleteDialogFragment extends DialogFragment {
private void doDelete(Bundle arguments, Context context) {
context.getContentResolver().delete(OnionServiceContentProvider.CONTENT_URI, OnionServiceContentProvider.OnionService._ID + '=' + arguments.getInt(OnionServiceActivity.BUNDLE_KEY_ID), null);
String base = context.getFilesDir().getAbsolutePath() + "/" + TorServiceConstants.ONION_SERVICES_DIR;
- DiskUtils.recursivelyDeleteDirectory(new File(base, arguments.getString(OnionServiceActivity.BUNDLE_KEY_PATH)));
+ String localPath = arguments.getString(OnionServiceActivity.BUNDLE_KEY_PATH);
+ if (localPath != null)
+ DiskUtils.recursivelyDeleteDirectory(new File(base, localPath));
}
}
More information about the tor-commits
mailing list