[Android] src: Don't leave an empty string when stripping the trailing slash
Edward Wang
git at videolan.org
Fri Jun 22 04:01:01 CEST 2012
android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Thu Jun 21 21:10:48 2012 -0400| [d99897b98824db429746502e97fc6bfd87bcc8ba] | committer: Edward Wang
src: Don't leave an empty string when stripping the trailing slash
> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=d99897b98824db429746502e97fc6bfd87bcc8ba
---
vlc-android/src/org/videolan/vlc/Util.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/Util.java b/vlc-android/src/org/videolan/vlc/Util.java
index a5412b1..d965c1b 100644
--- a/vlc-android/src/org/videolan/vlc/Util.java
+++ b/vlc-android/src/org/videolan/vlc/Util.java
@@ -63,7 +63,7 @@ public class Util {
public static String stripTrailingSlash(String _s) {
String s = _s;
- if(s.endsWith("/"))
+ if( s.endsWith("/") && s.length() > 1 )
s = s.substring(0,s.length()-1);
return s;
}
More information about the Android
mailing list