]> git.sesse.net Git - vlc/commitdiff
corrects drag&drop for skins on Linux (mrl wrongly interpreted)
authorErwan Tulou <brezhoneg1@yahoo.fr>
Thu, 26 Feb 2009 10:23:56 +0000 (11:23 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 3 Mar 2009 08:10:01 +0000 (09:10 +0100)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/gui/skins2/x11/x11_dragdrop.cpp

index ce4c5362f6d71672f6150b1c38ed7496357eacae..fd77b6c103187891b4a5e3c261b33341649ca7e7 100644 (file)
@@ -186,10 +186,9 @@ void X11DragDrop::dndDrop( ldata_t data )
         selection = selection.substr( 0, end - 1 );
 
         // Find the protocol, if any
-        string::size_type pos = selection.find( ":", 0 );
-        if( selection.find( "///", pos + 1 ) == pos + 1 )
+        if( selection.find( "file://", 0 ) == 0 )
         {
-            selection.erase( pos + 1, 2 );
+            selection.erase( 0, 7 );
         }
 
         char *psz_fileName = new char[selection.size() + 1];