From 117a811aa596d2ec5e2a8416f73e7a7c94ac44ce Mon Sep 17 00:00:00 2001 From: dmv Date: Thu, 1 Oct 2009 06:57:23 +0000 Subject: [PATCH] 0020502: EDF 1097 ALL: Load script with a name starting with a number --- src/SalomeApp/SalomeApp_Application.cxx | 3 +-- src/SalomeApp/resources/SalomeApp_msg_en.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index bea36e500..01690dd80 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -670,8 +670,7 @@ bool DumpStudyFileValidator::canSave(const QString& file, bool permissions) { QFileInfo fi( file ); QString name = fi.fileName(); - - if ( name.indexOf( QRegExp("[-!?#*&]") ) >= 0 ) { + if ( name.indexOf( QRegExp("[-!?#*&]") ) >= 0 || name.indexOf( QRegExp("[0-9]")) == 0 ) { SUIT_MessageBox::critical( parent(), QObject::tr("WRN_WARNING"), QObject::tr("WRN_FILE_NAME_BAD") ); diff --git a/src/SalomeApp/resources/SalomeApp_msg_en.ts b/src/SalomeApp/resources/SalomeApp_msg_en.ts index 2252e9a2a..51e3f870d 100644 --- a/src/SalomeApp/resources/SalomeApp_msg_en.ts +++ b/src/SalomeApp/resources/SalomeApp_msg_en.ts @@ -26,7 +26,7 @@ @default WRN_FILE_NAME_BAD - Please enter correct file name. Special characters are not allowed. + Please, enter a valid file name. The name should not contain any reserved characters or begin with a numeral. CLOSE_LOCKED_STUDY -- 2.39.2