# HG changeset patch # User Chris Cannam # Date 1294149917 0 # Node ID 0844b4d8d91187bdab098cdaf14f44a727a89aac # Parent 8c8c04bdf0faa37f9f3f7aabc3caa0dc081cf76f * Ensure explorer.exe invocation gets backslashes as directory separators, not forward slashes diff -r 8c8c04bdf0fa -r 0844b4d8d911 filestatuswidget.cpp --- a/filestatuswidget.cpp Tue Jan 04 12:42:28 2011 +0000 +++ b/filestatuswidget.cpp Tue Jan 04 14:05:17 2011 +0000 @@ -146,16 +146,24 @@ QDir d(m_localPath); if (d.exists()) { QStringList args; - args << d.canonicalPath(); + QString path = d.canonicalPath(); +#if defined Q_OS_WIN32 + // Although the Win32 API is quite happy to have + // forward slashes as directory separators, Windows + // Explorer is not + path = path.replace('/', '\\'); + args << path; + QProcess::execute("c:/windows/explorer.exe", args); +#else + args << path; QProcess::execute( -#if defined Q_OS_WIN32 - "c:/windows/explorer.exe", -#elif defined Q_OS_MAC +#if defined Q_OS_MAC "/usr/bin/open", #else "/usr/bin/xdg-open", #endif args); +#endif } }