char pBuff[20] = {0};
FILE *pIniFile = fopen(m_szSeqFileName, "r");
if (pIniFile == NULL)
{
pIniFile = fopen(m_szSeqFileName, "w");
if (NULL == pIniFile)
{
#ifdef WIN32
chmod(m_szSeqFileName, _S_IREAD | _S_IWRITE );
#else
chmod(m_szSeqFileName, 420);
#endif
pIniFile = fopen(m_szSeqFileName, "w");
}
if (pIniFile == NULL)
{
printf("CTraceLog::ReadFileSeq fail : %s\n", m_szSeqFileName);
perror("fopen :");
return FALSE;
}
}
阅读(308) | 评论(0) | 转发(0) |