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

List:       kde-bugs-dist
Subject:    [Bug 132421] kxkb multiuserproblem with files in /tmp
From:       Bernd Schubert <bernd-schubert () gmx ! de>
Date:       2006-08-25 18:34:09
Message-ID: 20060825183409.18217.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
         
http://bugs.kde.org/show_bug.cgi?id=132421         




------- Additional Comments From bernd-schubert gmx de  2006-08-25 20:34 -------
On Friday 25 August 2006 01:58, Bernd Schubert wrote:
> > Well, apperently that fails and doesn't return anything.
> >
> > 	QStringList dirs = KGlobal::dirs()->findDirs ( "tmp", "" );
> > 	m_tempDir = dirs.count() == 0 ? "/tmp/" : dirs[0];
>
> Ok, I just run through it with gdb and see that
> KGlobal::dirs()->findDirs ( "tmp", "") returns proper directories.
> Unfortunately dirs[0] = "/tmp/" and dirs[1] = "/tmp/kde-bernd/".
>
> So my question, should I find out why /tmp/ is at the first place or should
> I write a patch inserting an iterator searching for the next dir not being
> "/tmp/"?


I further read the sources and see that apperently kxkb is the only 
application in kdelibs and kdebase using findDirs("tmp", ...). All other tmp 
files are created by KTempFile(locateLocal("tmp", prefix), extension) or at 
least locateLocal() is used to return the tmp directory.

I think for kde-3.5 at least this patch should be used

--- extension.cpp.old   2006-03-17 11:17:41.000000000 +0100
+++ extension.cpp       2006-08-25 10:34:12.000000000 +0200
 @ -40,8 +40,7  @
                d = qt_xdisplay();
        m_dpy = d;

-       QStringList dirs = KGlobal::dirs()->findDirs ( "tmp", "" );
-       m_tempDir = dirs.count() == 0 ? "/tmp/" : dirs[0];
+       m_tempDir = locateLocal("tmp", "");
 }

Would it make sense to remove findDirs ( "tmp", ...) support in kde-4.0? So 
far I havn't checked in detail if locateLocal() is using it.

Cheers,
Bernd
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic