From 62a4869eb71af8c805d3b4d0fcb52b257bcb040a Mon Sep 17 00:00:00 2001 From: Coffeemakr Date: Tue, 13 Jun 2017 10:40:07 +0200 Subject: [PATCH] Fix download path handling (#580) --- .../main/java/org/schabi/newpipe/settings/SettingsFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/settings/SettingsFragment.java b/app/src/main/java/org/schabi/newpipe/settings/SettingsFragment.java index 119bc7e8c..d93b30874 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/SettingsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/SettingsFragment.java @@ -91,7 +91,7 @@ public class SettingsFragment extends PreferenceFragment implements SharedPrefer if ((requestCode == REQUEST_DOWNLOAD_PATH || requestCode == REQUEST_DOWNLOAD_AUDIO_PATH) && resultCode == Activity.RESULT_OK) { String key = getString(requestCode == REQUEST_DOWNLOAD_PATH ? R.string.download_path_key : R.string.download_path_audio_key); - String path = data.getData().toString().substring(7); + String path = data.getData().getPath(); defaultPreferences.edit().putString(key, path).apply(); updatePreferencesSummary(); } else if (requestCode == REQUEST_INSTALL_ORBOT) {