Code/Editor
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -98,7 +98,7 @@ CLevelFileDialog::CLevelFileDialog(bool openDialog, QWidget* parent)
|
||||
connect(ui->nameLineEdit, &QLineEdit::textChanged, this, &CLevelFileDialog::OnNameChanged);
|
||||
}
|
||||
|
||||
// reject invalid file names (see CryStringUtils::IsValidFileName)
|
||||
// reject invalid file names
|
||||
ui->nameLineEdit->setValidator(new QRegExpValidator(QRegExp("^[a-zA-Z0-9_\\-./]*$"), ui->nameLineEdit));
|
||||
|
||||
ReloadTree();
|
||||
@@ -315,7 +315,7 @@ void CLevelFileDialog::OnNewFolder()
|
||||
const QString newFolderName = inputDlg.textValue();
|
||||
const QString newFolderPath = parentFullPath + "/" + newFolderName;
|
||||
|
||||
if (!CryStringUtils::IsValidFileName(newFolderName.toUtf8().data()))
|
||||
if (!AZ::StringFunc::Path::IsValid(newFolderName.toUtf8().data()))
|
||||
{
|
||||
QMessageBox box(this);
|
||||
box.setText(tr("Please enter a single, valid folder name(standard English alphanumeric characters only)"));
|
||||
@@ -416,7 +416,7 @@ bool CLevelFileDialog::ValidateSaveLevelPath(QString& errorMessage) const
|
||||
const QString enteredPath = GetEnteredPath();
|
||||
const QString levelPath = GetLevelPath();
|
||||
|
||||
if (!CryStringUtils::IsValidFileName(Path::GetFileName(levelPath).toUtf8().data()))
|
||||
if (!AZ::StringFunc::Path::IsValid(Path::GetFileName(levelPath).toUtf8().data()))
|
||||
{
|
||||
errorMessage = tr("Please enter a valid level name (standard English alphanumeric characters only)");
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user