From d1c90f17eaf2409cd4fa074bd09f2e4ef1bb0033 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sun, 24 Apr 2016 17:50:43 +0000 Subject: [PATCH] kdecore: fix bug where KUrl::setPath() can set "file" scheme unnecessaraly Signed-off-by: Ivailo Monev --- kdecore/io/kurl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kdecore/io/kurl.cpp b/kdecore/io/kurl.cpp index 933a4946..5395c226 100644 --- a/kdecore/io/kurl.cpp +++ b/kdecore/io/kurl.cpp @@ -1460,7 +1460,7 @@ QString KUrl::relativeUrl(const KUrl &base_url, const KUrl &url) void KUrl::setPath( const QString& _path ) { - if ( scheme().isEmpty() ) + if ( scheme().isEmpty() && !_path.startsWith( QLatin1String("file:/") ) ) setScheme( QLatin1String( "file" ) ); QString path = KShell::tildeExpand( _path ); if (path.isEmpty())