BUG: File comparison on windows must test the volume serial number as well as the file index.
This commit is contained in:
parent
941c80a884
commit
4d68d005bc
|
@ -577,7 +577,8 @@ bool SystemTools::SameFile(const char* file1, const char* file2)
|
||||||
GetFileInformationByHandle( hFile2, &fiBuf2 );
|
GetFileInformationByHandle( hFile2, &fiBuf2 );
|
||||||
CloseHandle(hFile1);
|
CloseHandle(hFile1);
|
||||||
CloseHandle(hFile2);
|
CloseHandle(hFile2);
|
||||||
return (fiBuf1.nFileIndexHigh == fiBuf2.nFileIndexHigh &&
|
return (fiBuf1.dwVolumeSerialNumber == fiBuf2.dwVolumeSerialNumber &&
|
||||||
|
fiBuf1.nFileIndexHigh == fiBuf2.nFileIndexHigh &&
|
||||||
fiBuf1.nFileIndexLow == fiBuf2.nFileIndexLow);
|
fiBuf1.nFileIndexLow == fiBuf2.nFileIndexLow);
|
||||||
#else
|
#else
|
||||||
struct stat fileStat1, fileStat2;
|
struct stat fileStat1, fileStat2;
|
||||||
|
|
Loading…
Reference in New Issue