mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
kdecore: fix bug where KUrl::setPath() can set "file" scheme unnecessaraly
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
8273d7f32e
commit
d1c90f17ea
1 changed files with 1 additions and 1 deletions
|
@ -1460,7 +1460,7 @@ QString KUrl::relativeUrl(const KUrl &base_url, const KUrl &url)
|
||||||
|
|
||||||
void KUrl::setPath( const QString& _path )
|
void KUrl::setPath( const QString& _path )
|
||||||
{
|
{
|
||||||
if ( scheme().isEmpty() )
|
if ( scheme().isEmpty() && !_path.startsWith( QLatin1String("file:/") ) )
|
||||||
setScheme( QLatin1String( "file" ) );
|
setScheme( QLatin1String( "file" ) );
|
||||||
QString path = KShell::tildeExpand( _path );
|
QString path = KShell::tildeExpand( _path );
|
||||||
if (path.isEmpty())
|
if (path.isEmpty())
|
||||||
|
|
Loading…
Add table
Reference in a new issue