View Single Post
  #2  
Old 10-02-2009, 03:50 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,032
The Copy Files action compares the file timestamps (as reported by the FindFirstFile API) and sizes (as reported by the GetFileSize API) to determine if the files are different.

If either of those API calls return different values or fail, the file will be considered different. It does open the file (using CreateFile with GENERIC_READ, OPEN_EXISTING, and FILE_SHARE_READ) to get a handle for the GetFileSize call, so if that failed (for instance, if a file was locked from opening for reading by another app), that would result in it treating the files as different. We'll add a request to our list to investigate using the values returned by FindFirstFile instead (although this might also fail if the file is locked or for other reasons [network connectivity issues?]).

We'll also see about failing the step if any of the APIs used for comparing fails, reporting the error message in the build log.

http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx
http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx
http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx
Reply With Quote