On windows platform CopyFile is define for CopyFileA or CoplyFileW. Fix for compile.

This commit is contained in:
ExMix 2013-02-26 10:41:09 +03:00 committed by Alex Zolotarev
parent c570a06c42
commit 38d4a3d7f6
4 changed files with 4 additions and 4 deletions

View file

@ -95,7 +95,7 @@ UNIT_TEST(FileData_SharingAV_Windows)
// try rename or copy to locked file
TEST(!my::RenameFileX(name2, name1), ());
TEST(!my::CopyFile(name2, name1), ());
TEST(!my::CopyFileX(name2, name1), ());
// files should be unchanged
CheckFileOK(name1);

View file

@ -232,7 +232,7 @@ bool RenameFileX(string const & fOld, string const & fNew)
return CheckRemoveResult(res, fOld);
}
bool CopyFile(string const & fOld, string const & fNew)
bool CopyFileX(string const & fOld, string const & fNew)
{
try
{

View file

@ -47,7 +47,7 @@ bool GetFileSize(string const & fName, uint64_t & sz);
bool DeleteFileX(string const & fName);
bool RenameFileX(string const & fOld, string const & fNew);
/// @return false if copy fails. DO NOT THROWS exceptions
bool CopyFile(string const & fOld, string const & fNew);
bool CopyFileX(string const & fOld, string const & fNew);
bool IsEqualFiles(string const & firstFile, string const & secondFile);
}

View file

@ -618,7 +618,7 @@ bool Framework::AddBookmarksFile(string const & filePath)
if (fileExt == KML_EXTENSION)
{
fileSavePath = GenerateValidandUniqFilePathForKLM( GetFileName(filePath) );
if (!my::CopyFile(filePath, fileSavePath))
if (!my::CopyFileX(filePath, fileSavePath))
return false;
}
else if (fileExt == KMZ_EXTENSION)