session rename: clean up comment, use ollie-9p mv
This commit is contained in:
parent
63cf13b891
commit
4bd7a60e78
|
|
@ -62,7 +62,9 @@ ApplicationWindow {
|
|||
Shortcut {
|
||||
sequence: "Escape"
|
||||
onActivated: {
|
||||
if (ollie.activeState !== "idle") {
|
||||
if (renamingIndex >= 0) {
|
||||
cancelRename()
|
||||
} else if (ollie.activeState !== "idle") {
|
||||
ollie.interrupt()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -275,13 +275,7 @@ bool Ollie9pClient::renameSession(const QString &sessionId, const QString &newNa
|
|||
{
|
||||
if (sessionId.isEmpty() || newName.isEmpty()) return false;
|
||||
|
||||
// Use Twstat to rename the session directory.
|
||||
// We need to open the directory and write its stat.
|
||||
// 9p doesn't have a direct "mv" command, but we can use stat/rdwr
|
||||
// to read the current stat, modify the name, and write it back.
|
||||
// However, plan9port's 9p doesn't support wstat directly.
|
||||
//
|
||||
// Alternative: use our own ollie-9p which has a mv command.
|
||||
// Use ollie-9p mv (which uses 9P Twstat to rename the session directory).
|
||||
QString bin = QStandardPaths::findExecutable("ollie-9p");
|
||||
if (bin.isEmpty()) {
|
||||
qDebug() << "renameSession: ollie-9p not found, cannot rename";
|
||||
|
|
|
|||
Reference in New Issue