This commit is contained in:
DavidXanatos 2020-12-22 16:02:30 +01:00
parent 20390f4263
commit 818e72c99a
3 changed files with 6 additions and 5 deletions

View File

@ -1,4 +1,4 @@
Copyright 2020 - 2021 David Xanatos (xanasoft.com)
Copyright 2020 2021 David Xanatos (xanasoft.com)
Copyright 2004 2020 Sandboxie Holdings, LLC
This program is free software: you can redistribute it and/or modify

View File

@ -1051,7 +1051,7 @@ SB_STATUS CSbieAPI::ValidateName(const QString& BoxName)
if (DeviceNames.contains(BoxName, Qt::CaseInsensitive))
return SB_ERR(tr("The sandbox name can not be a device name."));
if (BoxName.contains(QRegExp("[A-Za-z0-9_]")))
if (BoxName.contains(QRegExp("[^A-Za-z0-9_]")))
return SB_ERR(tr("The sandbox name can contain only letters, digits and underscores which are displayed as spaces."));
return SB_OK;

View File

@ -80,7 +80,8 @@ void CNewBoxWindow::CreateBox()
}
}
CSandMan::CheckResults(QList<SB_STATUS>() << Status);
accept();
if(Status.IsError())
CSandMan::CheckResults(QList<SB_STATUS>() << Status);
else
accept();
}