summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/SystemTools.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-12-09 16:44:53 (GMT)
committerBrad King <brad.king@kitware.com>2003-12-09 16:44:53 (GMT)
commit4d68d005bc72f29c60c11738cd81436f21e5cadd (patch)
tree8ae69927123bf7e4e80942937b8c24abdddc7920 /Source/kwsys/SystemTools.cxx
parent941c80a884b77f56ae1e36a2f32468b5a1f8a914 (diff)
downloadCMake-4d68d005bc72f29c60c11738cd81436f21e5cadd.zip
CMake-4d68d005bc72f29c60c11738cd81436f21e5cadd.tar.gz
CMake-4d68d005bc72f29c60c11738cd81436f21e5cadd.tar.bz2
BUG: File comparison on windows must test the volume serial number as well as the file index.
Diffstat (limited to 'Source/kwsys/SystemTools.cxx')
-rw-r--r--Source/kwsys/SystemTools.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index 1af2243..fd3e3da 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -577,7 +577,8 @@ bool SystemTools::SameFile(const char* file1, const char* file2)
GetFileInformationByHandle( hFile2, &fiBuf2 );
CloseHandle(hFile1);
CloseHandle(hFile2);
- return (fiBuf1.nFileIndexHigh == fiBuf2.nFileIndexHigh &&
+ return (fiBuf1.dwVolumeSerialNumber == fiBuf2.dwVolumeSerialNumber &&
+ fiBuf1.nFileIndexHigh == fiBuf2.nFileIndexHigh &&
fiBuf1.nFileIndexLow == fiBuf2.nFileIndexLow);
#else
struct stat fileStat1, fileStat2;