[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KStandardDirs
From:       Stephan Kulow <coolo () kde ! org>
Date:       2003-06-05 18:57:10
[Download RAW message or body]

Am Thursday 05 June 2003 20:52 schrieb André Wöbbeking:
> > 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);
> >    }
> > }
>
> Yes, something like that, but ~ don't need to be /home.

Guys, this is useless. Look here:
coolo@othello#coolo>export KDEDIR=~coolo/kde
coolo@othello#coolo>echo $KDEDIR
/home/coolo/kde

So if this code is called at all, you've set KDEDIR to '~foo' to
avoid the shell expansion - and then you're to blame. The
code is there to catch the ~ special case localkdedir in case 
you su - then the ~ is replaced with the user running the
application, not to those that set localkdedir.

Greetings, Stephan

-- 
Pace Peace Paix Paz Frieden Pax Pokój Friður Fred Béke 和平
Hasiti Lapé Hetep Malu Mир Wolakota Santiphap Irini שלום Peoch
Shanti Vrede Baris Rój Mír Taika Rongo Sulh Py'guapy 평화
 
>> 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