From: Jean-Baptiste Kempf Date: Mon, 23 Aug 2010 21:59:24 +0000 (+0200) Subject: Qt: try to fix the "open containing folder" on Win32 X-Git-Tag: 1.2.0-pre1~5365 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=89f5d36846718c86518e11d6f542e61b8823b5ab;p=vlc Qt: try to fix the "open containing folder" on Win32 Should close #3536 --- diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp index 4b61009a77..bd9b610199 100644 --- a/modules/gui/qt4/components/playlist/playlist_model.cpp +++ b/modules/gui/qt4/components/playlist/playlist_model.cpp @@ -1064,6 +1064,12 @@ void PLModel::popupExplore() !strncasecmp( psz_access, "file", 4 ) || !strncasecmp( psz_access, "dire", 4 ) )) { +#ifdef WIN32 + /* Qt openURL doesn't know to open files that starts with a / or \ */ + if( psz_path[0] == '/' || psz_path[0] == '\\' ) + psz_path++; +#endif + QFileInfo info( qfu( decode_URI( psz_path ) ) ); QDesktopServices::openUrl( QUrl::fromLocalFile( info.absolutePath() ) );