]> git.sesse.net Git - vlc/commitdiff
Qt: try to fix the "open containing folder" on Win32
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 23 Aug 2010 21:59:24 +0000 (23:59 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 23 Aug 2010 22:00:53 +0000 (00:00 +0200)
Should close #3536

modules/gui/qt4/components/playlist/playlist_model.cpp

index 4b61009a773a7fb959cb571529f1ab2b6efe8036..bd9b610199818b997f576279feae3409a00ded4f 100644 (file)
@@ -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() ) );