mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 23:28:14 +03:00
Fix open the local folder action on Win32, workarounded a Qt bug.
This commit is contained in:
parent
f9b060fe82
commit
bbef2ef30e
1 changed files with 10 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue