mirror of
https://github.com/wh201906/Proxmark3GUI.git
synced 2024-11-10 08:55:43 +08:00
Fail to support non-ASCII chars in path
Using "chcp" seems to have no effect there I fix a small bug then
This commit is contained in:
parent
a232e4ec83
commit
9e31496131
1 changed files with 6 additions and 2 deletions
|
@ -139,13 +139,17 @@ void MainWindow::on_PM3_connectButton_clicked()
|
||||||
envSetProcess.waitForReadyRead(10000);
|
envSetProcess.waitForReadyRead(10000);
|
||||||
QString test = QString(envSetProcess.readAll());
|
QString test = QString(envSetProcess.readAll());
|
||||||
clientEnv = test.split(QRegExp("[\r\n]{1,2}"), QString::SkipEmptyParts);
|
clientEnv = test.split(QRegExp("[\r\n]{1,2}"), QString::SkipEmptyParts);
|
||||||
clientEnv.removeFirst();
|
if(clientEnv.size() > 2) // the first element is "set" and the last element is the current path
|
||||||
|
{
|
||||||
|
clientEnv.removeFirst();
|
||||||
|
clientEnv.removeLast();
|
||||||
|
emit setProcEnv(&clientEnv);
|
||||||
|
}
|
||||||
qDebug() << clientEnv;
|
qDebug() << clientEnv;
|
||||||
// qDebug() << "Get Env List" << clientEnv;
|
// qDebug() << "Get Env List" << clientEnv;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
clientEnv.clear();
|
clientEnv.clear();
|
||||||
emit setProcEnv(&clientEnv);
|
|
||||||
|
|
||||||
clientWorkingDir->setPath(QApplication::applicationDirPath());
|
clientWorkingDir->setPath(QApplication::applicationDirPath());
|
||||||
qDebug() << clientWorkingDir->absolutePath();
|
qDebug() << clientWorkingDir->absolutePath();
|
||||||
|
|
Loading…
Reference in a new issue