Commit 0282e5c9 authored by Robert Knight's avatar Robert Knight

Fix creation of SSH bookmarks from foreground process details.

svn path=/branches/work/konsole-split-view/; revision=655626
parent 6c5d38e7
......@@ -105,9 +105,13 @@ KUrl SessionController::url() const
int pid = info->foregroundPid(&ok);
if ( ok )
{
qDebug() << "reading session process = " << info->name(&ok);
ProcessInfo* foregroundInfo = ProcessInfo::newInstance(pid);
foregroundInfo->update();
qDebug() << "reading foreground process = " << foregroundInfo->name(&ok);
// for remote connections, save the user and host
// bright ideas to get the directory at the other end are welcome :)
if ( foregroundInfo->name(&ok) == "ssh" && ok )
......@@ -115,11 +119,13 @@ KUrl SessionController::url() const
SSHProcessInfo sshInfo(*foregroundInfo);
path = "ssh://" + sshInfo.userName() + '@' + sshInfo.host();
}
else
{
path = foregroundInfo->currentDir(&ok);
path = foregroundInfo->currentDir(&ok);
if (!ok)
path = QString::null;
if (!ok)
path = QString::null;
}
delete foregroundInfo;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment