diff --git a/gui/main.qml b/gui/main.qml index e85aab9..c071c06 100644 --- a/gui/main.qml +++ b/gui/main.qml @@ -62,7 +62,9 @@ ApplicationWindow { Shortcut { sequence: "Escape" onActivated: { - if (ollie.activeState !== "idle") { + if (renamingIndex >= 0) { + cancelRename() + } else if (ollie.activeState !== "idle") { ollie.interrupt() } } diff --git a/gui/ollie9pclient.cpp b/gui/ollie9pclient.cpp index 110ba78..8e73ea2 100644 --- a/gui/ollie9pclient.cpp +++ b/gui/ollie9pclient.cpp @@ -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";