From: asl Date: Tue, 25 Apr 2006 12:32:31 +0000 (+0000) Subject: more precise determination of file version X-Git-Tag: T3_2_0b1_pre1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=26a0dbeab9ad5fef1d8c1af6b39882282f787dd7;p=modules%2Fgui.git more precise determination of file version --- diff --git a/src/Session/SALOME_Session_Server.cxx b/src/Session/SALOME_Session_Server.cxx index 0ef468bee..02741922e 100755 --- a/src/Session/SALOME_Session_Server.cxx +++ b/src/Session/SALOME_Session_Server.cxx @@ -190,7 +190,7 @@ protected: virtual int userFileId( const QString& _fname ) const { QRegExp exp( "\\.SalomeApprc\\.([a-zA-Z0-9.]+)$" ); - QRegExp vers_exp( "^([0-9]+)([A-Za-z]?)([0-9]*)" ); + QRegExp vers_exp( "^([0-9]+)([A-Za-z]?)([0-9]*)$" ); QString fname = QFileInfo( _fname ).fileName(); if( exp.exactMatch( fname ) ) @@ -199,7 +199,8 @@ protected: int major=0, minor=0; major = vers[0].toInt(); minor = vers[1].toInt(); - vers_exp.search( vers[2] ); + if( vers_exp.search( vers[2] )==-1 ) + return -1; int release = 0, dev1 = 0, dev2 = 0; release = vers_exp.cap( 1 ).toInt(); dev1 = vers_exp.cap( 2 )[ 0 ].latin1();