From: dmv Date: Mon, 19 May 2008 07:39:23 +0000 (+0000) Subject: NPAL19730 EDF 700 ALL : Dump study filename verification too restrictive X-Git-Tag: TG_ELNO_visualization_28May2008~17 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=92b47690231337a50d70591cafe04442e11c994a;p=modules%2Fgui.git NPAL19730 EDF 700 ALL : Dump study filename verification too restrictive --- diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index 894ca64fd..62e7e8386 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -700,8 +700,10 @@ class DumpStudyFileValidator : public SUIT_FileValidator bool DumpStudyFileValidator::canSave(const QString& file) { - // if file name is not correct... - if ( file.find( QRegExp("[-!?#*&]") ) != -1 ) { + QFileInfo fi( file ); + QString name = fi.fileName(); + + if ( name.find( QRegExp("[-!?#*&]") ) != -1 ) { SUIT_MessageBox::error1 ( parent(), QObject::tr("WRN_WARNING"), QObject::tr("WRN_FILE_NAME_BAD"),