From: dmv Date: Thu, 1 Oct 2009 06:57:23 +0000 (+0000) Subject: 0020502: EDF 1097 ALL: Load script with a name starting with a number X-Git-Tag: V5_1_3rc1~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=117a811aa596d2ec5e2a8416f73e7a7c94ac44ce;p=modules%2Fgui.git 0020502: EDF 1097 ALL: Load script with a name starting with a number --- 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