[GME-commit] GMESRC/GME/XmlBackEnd CoreXmlFile.cpp,1.9,1.10

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Sat Jun 2 11:05:20 CDT 2007


Update of /project/gme-repository/GMESRC/GME/XmlBackEnd
In directory escher:/tmp/cvs-serv5834

Modified Files:
	CoreXmlFile.cpp 
Log Message:
Attempt to fix JIRA-149 when simple VSS-based multi user project creation fails.
http://escher.isis.vanderbilt.edu/JIRA/browse/GME-149
Summary:
Create a new multiuser project with VSS and do the following: 
1) Create SF project 
2) Save project (don't keep parts checked out) 
3) Add Compound object to RootFolder (say okay to check out) 
4) "Parts of project have been modified by another user" error occurs.




CVS User: Zoltan Molnar, ISIS (zolmol)

Index: CoreXmlFile.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/CoreXmlFile.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** CoreXmlFile.cpp	16 Sep 2005 15:41:01 -0000	1.9
--- CoreXmlFile.cpp	2 Jun 2007 16:05:18 -0000	1.10
***************
*** 3117,3121 ****
              // get last write time
              WIN32_FILE_ATTRIBUTE_DATA attr;        
!             GetFileAttributesEx( filename.c_str(), GetFileExInfoStandard, &attr );
              CTime lastWriteTime( attr.ftLastWriteTime );
  
--- 3117,3131 ----
              // get last write time
              WIN32_FILE_ATTRIBUTE_DATA attr;        
!             BOOL res = GetFileAttributesEx( filename.c_str(), GetFileExInfoStandard, &attr );
!             // inserted by zolmol:
!             DWORD dwerror = res ? ERROR_SUCCESS : GetLastError(); // res == 0 in case of failure
!             if( dwerror == ERROR_FILE_NOT_FOUND) // != ERROR_SUCCESS)
!             {
!                 // in case of new objects have been introduced the respective files 
!                 // are not found (FILE_NOT_FOUND) and the obj->lastwritetime is 0
!                 ASSERT( obj->m_lastWriteTime == 0);
!                 continue;
!             } // end of zolmol code
! 
              CTime lastWriteTime( attr.ftLastWriteTime );
  



More information about the GME-commit mailing list