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
1 changed files with 8 additions and 6 deletions

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;