1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-16 19:31:02 +01:00

Update show in file browser to work with URLs.

Fixes issue #2002
This commit is contained in:
John Maguire 2011-10-26 14:43:28 +02:00
parent e1a99f1909
commit cc986b7177

View File

@ -287,14 +287,16 @@ void OpenInFileBrowser(const QStringList& filenames) {
QSet<QString> dirs;
foreach (const QString& filename, filenames) {
// Ignore things that look like URLs
if (filename.contains("://"))
QUrl url(filename);
if (url.scheme() != "file") {
continue;
}
QString path = url.toLocalFile();
if (!QFile::exists(path))
continue;
if (!QFile::exists(filename))
continue;
const QString directory = QFileInfo(filename).dir().path();
const QString directory = QFileInfo(path).dir().path();
if (dirs.contains(directory))
continue;