[Android] Correctly encode mrls for ban/uban

Geoffrey Métais git at videolan.org
Fri Dec 8 14:47:53 CET 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Dec  8 14:37:04 2017 +0100| [e18a79442223d6ef505773b23b89cc9b2c5df12f] | committer: Geoffrey Métais

Correctly encode mrls for ban/uban

> https://code.videolan.org/videolan/vlc-android/commit/e18a79442223d6ef505773b23b89cc9b2c5df12f
---

 medialibrary/src/org/videolan/medialibrary/Medialibrary.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/medialibrary/src/org/videolan/medialibrary/Medialibrary.java b/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
index edd9770f6..9c8e1e244 100644
--- a/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
+++ b/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
@@ -99,12 +99,12 @@ public class Medialibrary {
 
     public void banFolder(@NonNull String path) {
         if (mIsInitiated && new File(path).exists())
-            nativeBanFolder(Tools.encodeVLCMrl(path));
+            nativeBanFolder(Tools.encodeVLCMrl(Uri.encode(path, "/")));
     }
 
     public void unbanFolder(@NonNull String path) {
         if (mIsInitiated && new File(path).exists())
-            nativeUnbanFolder(Tools.encodeVLCMrl(path));
+            nativeUnbanFolder(Tools.encodeVLCMrl(Uri.encode(path, "/")));
     }
 
     public String[] getDevices() {



More information about the Android mailing list