summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libmpdemux/url.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libmpdemux/url.c b/libmpdemux/url.c
index b885de0657..5df6a0a9d9 100644
--- a/libmpdemux/url.c
+++ b/libmpdemux/url.c
@@ -57,6 +57,11 @@ url_new(char* url) {
// check if a username:password is given
ptr2 = strstr(ptr1, "@");
+ ptr3 = strstr(ptr1, "/");
+ if( ptr3!=NULL && ptr3<ptr2 ) {
+ // it isn't really a username but rather a part of the path
+ ptr2 = NULL;
+ }
if( ptr2!=NULL ) {
// We got something, at least a username...
int len = ptr2-ptr1;