//check if Makefile file exists
std::string pathMakefile = pathFixed + CDMUtilities::SLASH + "Makefile";
- FILE* pFile = fopen(pathMakefile.c_str(), "r");
+ FILE* pFile;
+ errno_t errorOpen = fopen_s(&pFile, pathMakefile.c_str(), "r");
//is the binary folder
- if (pFile != NULL)
+ if (!errorOpen && pFile)
{
fclose(pFile);
std::ifstream readFile;
std::string pathSource = "";
//check if CMakeLists file exists
std::string pathCMakeLists = pathFixed + CDMUtilities::SLASH + "CMakeLists.txt";
- pFile = fopen(pathCMakeLists.c_str(), "r");
+ errorOpen = fopen_s(&pFile, pathCMakeLists.c_str(), "r");
//is the source folder
- if (pFile != NULL)
+ if (!errorOpen && pFile)
{
fclose(pFile);
std::ifstream readFile;