Merge branch 'master' into master

This commit is contained in:
isaak654 2024-07-17 16:53:18 +02:00 committed by GitHub
parent c1205fd043
commit 36a98ad3d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 9 deletions

View File

@ -1640,15 +1640,15 @@ void CSandMan::OnMessage(const QString& MsgData)
{
QString respone = QInputDialog::getText(g_GUIParent, tr("Which box you want to add in?"), tr("Type the box name which you are going to set:"));
if(!respone.isEmpty())
QString response = QInputDialog::getText(g_GUIParent, tr("Which box you want to add in?"), tr("Type the box name which you are going to set:"));
if(!response.isEmpty())
{
if (theAPI->GetBoxByName(respone) != NULL) {
if (theAPI->GetBoxByName(response) != NULL) {
if (Message.right(1)=="\\"||!Message.contains(".", Qt::CaseInsensitive)) {
theAPI->GetBoxByName(respone)->AppendText("ForceFolder", Message.mid(4).replace("\"",""));
theAPI->GetBoxByName(response)->AppendText("ForceFolder", Message.mid(4).replace("\"",""));
}
else {
theAPI->GetBoxByName(respone)->AppendText("ForceProcess", Message.mid(4).replace("\"", "").mid(Message.mid(4).replace("\"", "").lastIndexOf("\\")+1));
theAPI->GetBoxByName(response)->AppendText("ForceProcess", Message.mid(4).replace("\"", "").mid(Message.mid(4).replace("\"", "").lastIndexOf("\\")+1));
}
}
@ -1664,11 +1664,11 @@ void CSandMan::OnMessage(const QString& MsgData)
{
QString respone = QInputDialog::getText(g_GUIParent, tr("Which box you want to add in?"), tr("Type the box name which you are going to set:"));
if (!respone.isEmpty())
QString response = QInputDialog::getText(g_GUIParent, tr("Which box you want to add in?"), tr("Type the box name which you are going to set:"));
if (!response.isEmpty())
{
if (theAPI->GetBoxByName(respone) != NULL) {
theAPI->GetBoxByName(respone)->AppendText("OpenFilePath", Message.mid(4).replace("\"", ""));
if (theAPI->GetBoxByName(response) != NULL) {
theAPI->GetBoxByName(response)->AppendText("OpenFilePath", Message.mid(4).replace("\"", ""));
}
else {
QMessageBox::warning(g_GUIParent, tr("Sandboxie-Plus Warning"), tr("You typed a wrong box name!Nothing was changed."), QMessageBox::Ok, 0);