[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: KStandardDirs
From: Amilcar do Carmo Lucas <amilcar () ida ! ing ! tu-bs ! de>
Date: 2003-06-05 17:42:33
[Download RAW message or body]
Andras Mantia wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>On Thursday 05 June 2003 18:32, André Wöbbeking wrote:
>
>
>>Hi,
>>
>>KStandardDirs use the routine
>>
>>static void fixHomeDir(QString &dir)
>>{
>> if (dir[0] == '~')
>> {
>> dir = QDir::homeDirPath() + dir.mid(1);
>> }
>>}
>>
>>what happens with paths like ~foo/kde?
>>
>>
>
>/home/userfoo/kde ? (~ = /home/user)
>
>Andras
>
>
>
yes Andras, you're right that's what you get out of this code.
But what you should get is /home/foo/kde
This is a bug, a fix whould be:
static void fixHomeDir(QString &dir)
{
if (dir[0] == '~' && dir[1] == '/')
{
dir = QDir::homeDirPath() + dir.mid(1);
}
else
{
dir = "/home/" + dir.mid(1);
}
}
--
Amilcar Lucas
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic