commit
e92ab64b81
|
@ -1642,12 +1642,21 @@ void CSandMan::OnMessage(const QString& MsgData)
|
||||||
if (!response.isEmpty())
|
if (!response.isEmpty())
|
||||||
{
|
{
|
||||||
if (theAPI->GetBoxByName(response) != NULL) {
|
if (theAPI->GetBoxByName(response) != NULL) {
|
||||||
|
QString dirOrFile = Message.mid(9).replace("\"", "").trimmed();
|
||||||
|
QFileInfo fileInfo(dirOrFile);
|
||||||
if (Message.right(1) == "\\" || !Message.contains(".", Qt::CaseInsensitive)) {
|
if (Message.right(1) == "\\" || !Message.contains(".", Qt::CaseInsensitive)) {
|
||||||
theAPI->GetBoxByName(response)->AppendText("ForceFolder", Message.mid(9).replace("\"",""));
|
theAPI->GetBoxByName(response)->AppendText("ForceFolder", dirOrFile);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
theAPI->GetBoxByName(response)->AppendText("ForceProcess", Message.mid(9).replace("\"", "").mid(Message.mid(9).replace("\"", "").lastIndexOf("\\")+1));
|
if (fileInfo.exists() && fileInfo.isDir()) {
|
||||||
|
theAPI->GetBoxByName(response)->AppendText("ForceFolder", dirOrFile);
|
||||||
|
}
|
||||||
|
else if (fileInfo.exists() && fileInfo.isExecutable()) {
|
||||||
|
theAPI->GetBoxByName(response)->AppendText("ForceProcess", dirOrFile.mid(dirOrFile.lastIndexOf("\\") + 1));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
QMessageBox::warning(g_GUIParent, tr("Sandboxie-Plus Warning"), tr("The value is not an existing directory or executable."), QMessageBox::Ok, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue