]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
more precise determination of file version T3_2_0b1_pre1
authorasl <asl@opencascade.com>
Tue, 25 Apr 2006 12:32:31 +0000 (12:32 +0000)
committerasl <asl@opencascade.com>
Tue, 25 Apr 2006 12:32:31 +0000 (12:32 +0000)
src/Session/SALOME_Session_Server.cxx

index 0ef468beedabf0e7a01a2be95dc2ecc2f2e03d9a..02741922e44894ee4735405c09e19e2f8103b7f0 100755 (executable)
@@ -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();