]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/x11/x11_dragdrop.cpp
corrects drag&drop for skins on Linux (mrl wrongly interpreted)
[vlc] / modules / gui / skins2 / x11 / x11_dragdrop.cpp
old mode 100755 (executable)
new mode 100644 (file)
index e060cff..fd77b6c
@@ -1,11 +1,11 @@
 /*****************************************************************************
  * x11_dragdrop.cpp
  *****************************************************************************
- * Copyright (C) 2003 VideoLAN
+ * Copyright (C) 2003 the VideoLAN team
  * $Id$
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
- *          Olivier Teulière <ipkiss@via.ecp.fr>
+ *          Olivier Teulière <ipkiss@via.ecp.fr>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifdef X11_SKINS
@@ -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];