Update SbieView.cpp

Disable the use of these characters for the Box Group name, which can cause some exceptions.
This commit is contained in:
okrc 2022-09-16 07:31:13 +08:00 committed by GitHub
parent 379ffa750a
commit a8cdb40295
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -963,6 +963,12 @@ QString CSbieView::AddNewGroup()
bool CSbieView::TestNameAndWarn(const QString& Name)
{
if (Name.contains(QRegularExpression("[,()]")))
{
QMessageBox::critical(this, "Sandboxie-Plus", tr("The Sandbox name and Box Group name cannot use the ',()' symbol."));
return false;
}
if (m_Groups.contains(Name)) {
QMessageBox::critical(this, "Sandboxie-Plus", tr("This name is already used for a Box Group."));
return false;