Fix opening the explorer with a selected file on windows.

Should Fix #1249
This commit is contained in:
Olivier Goffart 2013-12-09 16:12:23 +01:00
parent 93ac78fd75
commit e5edb8e2c7

View File

@ -305,11 +305,11 @@ void Utility::showInFileManager(const QString &localPath)
{
if (isWindows()) {
const QString explorer = "explorer.exe"; // FIXME: we trust it's in PATH
QStringList param;
QString param;
if (!QFileInfo(localPath).isDir())
param += QLatin1String("/select,");
param += QDir::toNativeSeparators(localPath);
QProcess::startDetached(explorer, param);
QProcess::startDetached(explorer, QStringList(param));
} else if (isMac()) {
QStringList scriptArgs;
scriptArgs << QLatin1String("-e")