For Q_OS_MAC, obtain the current directory. There is still the issue of when it is a

symlink that the linked directory is given, not the symlink.


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1185298
This commit is contained in:
Kurt Hindenburg
2010-10-12 21:11:17 +00:00
parent f35692af26
commit 71a9a5d3d8

View File

@@ -43,6 +43,7 @@
#if defined(Q_OS_MAC)
#include <sys/sysctl.h>
#include <libproc.h>
#ifdef HAVE_SYS_PROC_INFO_H
#include <sys/proc_info.h>
#endif
@@ -807,7 +808,13 @@ private:
}
virtual bool readCurrentDir(int pid)
{
Q_UNUSED(pid);
struct proc_vnodepathinfo vpi;
int nb = proc_pidinfo(pid, PROC_PIDVNODEPATHINFO, 0, &vpi, sizeof(vpi));
if (nb == sizeof(vpi))
{
setCurrentDir(QString(vpi.pvi_cdir.vip_path));
return true;
}
return false;
}
virtual bool readEnvironment(int pid)