]> git.sesse.net Git - vlc/commitdiff
Use the input_MRLSplit to open containing folder for directory and files only.
authorJean-Baptiste Kempf <jb@videolan.org>
Fri, 22 Aug 2008 18:53:54 +0000 (11:53 -0700)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 22 Aug 2008 18:55:05 +0000 (11:55 -0700)
modules/gui/qt4/components/playlist/playlist_model.cpp

index 6d4fc637865ac09857597fca169b762e029ddade..3bb985c00f79e386b559c22e88acf67986331227 100644 (file)
@@ -946,9 +946,19 @@ void PLModel::popupExplore()
        char *psz_meta = input_item_GetURI( p_input );
        if( psz_meta )
        {
-           /* FIXME add a MRLSplit like function */
-           QFileInfo info( qfu( psz_meta ) );
-           QDesktopServices::openUrl( QUrl::fromLocalFile( info.absolutePath() ) );
+           const char *psz_access;
+           const char *psz_demux;
+           char  *psz_path;
+           input_SplitMRL( &psz_access, &psz_demux, &psz_path, psz_meta );
+
+           if( EMPTY_STR( psz_access ) ||
+               !strncasecmp( psz_access, "file", 4 ) ||
+               !strncasecmp( psz_access, "dire", 4 ) )
+           {
+               QFileInfo info( qfu( psz_meta ) );
+               QDesktopServices::openUrl(
+                               QUrl::fromLocalFile( info.absolutePath() ) );
+           }
            free( psz_meta );
        }
     }