┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/terminal/terminalpanel.cpp
diff options
context:
space:
mode:
authorMéven Car <[email protected]>2023-04-20 18:15:56 +0200
committerMéven Car <[email protected]>2023-04-21 15:32:58 +0200
commita654b8dae671140da73d70d80bb2f6e2b0282c18 (patch)
tree8dc8e3ab9e3e7ed53052d887bc3781fc96ce8f14 /src/panels/terminal/terminalpanel.cpp
parent7a7215a94840662e2583ec49836ea5a38a57e514 (diff)
TerminalPanel: better check if terminal needs to change its currentWorkingDirectory when unmounting
CCBUG: 467403
Diffstat (limited to 'src/panels/terminal/terminalpanel.cpp')
-rw-r--r--src/panels/terminal/terminalpanel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp
index 53464e620..49eb42c1d 100644
--- a/src/panels/terminal/terminalpanel.cpp
+++ b/src/panels/terminal/terminalpanel.cpp
@@ -54,12 +54,12 @@ void TerminalPanel::goHome()
sendCdToTerminal(QDir::homePath(), HistoryPolicy::SkipHistory);
}
-QString TerminalPanel::currentWorkingDirectory()
+bool TerminalPanel::currentWorkingDirectoryIsParentOf(const QString &path) const
{
if (m_terminal) {
- return m_terminal->currentWorkingDirectory();
+ return m_terminal->currentWorkingDirectory().startsWith(path);
}
- return QString();
+ return false;
}
void TerminalPanel::terminalExited()