Skip to content

Commit

Permalink
src:Fix set workdir issue
Browse files Browse the repository at this point in the history
Signed-off-by: xiaoming <2014500726@smail.xtu.edu.cn>
  • Loading branch information
QQxiaoming committed Nov 8, 2023
1 parent d23fb5e commit 525c91a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2310,7 +2310,7 @@ QString MainWindow::startLocalShellSession(MainWidgetGroup *group, const QString
QString workDir = getDirAndcheckeSysName(newTitle);
if(!workDir.isEmpty()) {
sessionsWindow->setShortTitle(workDir);
QFileInfo fileInfo(workDir);
QFileInfo fileInfo(workDir.replace("~",QDir::homePath()));
if(fileInfo.isDir()) {
sessionsWindow->setWorkingDirectory(workDir.replace("~",QDir::homePath()));
}
Expand Down Expand Up @@ -2435,7 +2435,7 @@ int MainWindow::cloneCurrentSession(MainWidgetGroup *group, QString name)
QString workDir = getDirAndcheckeSysName(newTitle);
if(!workDir.isEmpty()) {
sessionsWindowClone->setShortTitle(workDir);
QFileInfo fileInfo(workDir);
QFileInfo fileInfo(workDir.replace("~",QDir::homePath()));
if(fileInfo.isDir()) {
sessionsWindowClone->setWorkingDirectory(workDir.replace("~",QDir::homePath()));
}
Expand Down

0 comments on commit 525c91a

Please sign in to comment.