Changed: Minor changes
This commit is contained in:
parent
f4136bcdca
commit
b2f2c2446e
1 changed files with 7 additions and 7 deletions
|
@ -2386,15 +2386,15 @@ bool CFile::copyFile(const std::string &dest, const std::string &src, bool failI
|
||||||
bool CFile::quickFileCompare(const std::string &fileName0, const std::string &fileName1)
|
bool CFile::quickFileCompare(const std::string &fileName0, const std::string &fileName1)
|
||||||
{
|
{
|
||||||
// make sure the files both exist
|
// make sure the files both exist
|
||||||
if (!fileExists(fileName0.c_str()) || !fileExists(fileName1.c_str()))
|
if (!fileExists(fileName0) || !fileExists(fileName1))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// compare time stamps
|
// compare time stamps
|
||||||
if (getFileModificationDate(fileName0.c_str()) != getFileModificationDate(fileName1.c_str()))
|
if (getFileModificationDate(fileName0) != getFileModificationDate(fileName1))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// compare file sizes
|
// compare file sizes
|
||||||
if (getFileSize(fileName0.c_str()) != getFileSize(fileName1.c_str()))
|
if (getFileSize(fileName0) != getFileSize(fileName1))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// everything matched so return true
|
// everything matched so return true
|
||||||
|
@ -2404,14 +2404,14 @@ bool CFile::quickFileCompare(const std::string &fileName0, const std::string &fi
|
||||||
bool CFile::thoroughFileCompare(const std::string &fileName0, const std::string &fileName1,uint32 maxBufSize)
|
bool CFile::thoroughFileCompare(const std::string &fileName0, const std::string &fileName1,uint32 maxBufSize)
|
||||||
{
|
{
|
||||||
// make sure the files both exist
|
// make sure the files both exist
|
||||||
if (!fileExists(fileName0.c_str()) || !fileExists(fileName1.c_str()))
|
if (!fileExists(fileName0) || !fileExists(fileName1))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// setup the size variable from file length of first file
|
// setup the size variable from file length of first file
|
||||||
uint32 fileSize=getFileSize(fileName0.c_str());
|
uint32 fileSize=getFileSize(fileName0);
|
||||||
|
|
||||||
// compare file sizes
|
// compare file sizes
|
||||||
if (fileSize != getFileSize(fileName1.c_str()))
|
if (fileSize != getFileSize(fileName1))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// allocate a couple of data buffers for our 2 files
|
// allocate a couple of data buffers for our 2 files
|
||||||
|
|
Loading…
Reference in a new issue