From bbef2ef30e0a21377303b7d15e3e0143f8a5fd29 Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Wed, 16 May 2012 11:42:47 +0200 Subject: [PATCH] Fix open the local folder action on Win32, workarounded a Qt bug. --- src/mirall/application.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mirall/application.cpp b/src/mirall/application.cpp index 76c54c4f4..5d5178584 100644 --- a/src/mirall/application.cpp +++ b/src/mirall/application.cpp @@ -318,6 +318,16 @@ void Application::slotFolderOpenAction( const QString& alias ) if( f ) { QUrl url(f->path(), QUrl::TolerantMode); url.setScheme( "file" ); + +#ifdef Q_OS_WIN32 + // work around a bug in QDesktopServices on Win32, see i-net + QString filePath = f->path(); + + if (filePath.startsWith("\\\\") || filePath.startsWith("//")) + url.setUrl(QDir::toNativeSeparators(filePath)); + else + url = QUrl::fromLocalFile(filePath); +#endif QDesktopServices::openUrl(url); } }