Replace raw stat/lstat with wx macros

This is shorter, more clear and more portable.

No real changes.

Closes #22670.
This commit is contained in:
Aldo Mazzeo 2022-07-26 18:38:44 +02:00 committed by Vadim Zeitlin
parent 6ed6d97bfe
commit 20463b2e69
3 changed files with 3 additions and 3 deletions

View file

@ -336,7 +336,7 @@ bool wxTempFFile::Open(const wxString& strName)
mode_t mode;
wxStructStat st;
if ( stat( (const char*) m_strName.fn_str(), &st) == 0 )
if ( wxStat(m_strName, &st) == 0 )
{
mode = st.st_mode;
}

View file

@ -556,7 +556,7 @@ bool wxTempFile::Open(const wxString& strName)
mode_t mode;
wxStructStat st;
if ( stat( (const char*) m_strName.fn_str(), &st) == 0 )
if ( wxStat(m_strName, &st) == 0 )
{
mode = st.st_mode;
}

View file

@ -184,7 +184,7 @@ void wxFileData::ReadData()
wxStructStat buff;
#if defined(__UNIX__) && !defined(__VMS)
const bool hasStat = lstat( m_filePath.fn_str(), &buff ) == 0;
const bool hasStat = wxLstat( m_filePath, &buff ) == 0;
if ( hasStat )
m_type |= S_ISLNK(buff.st_mode) ? is_link : 0;
#else // no lstat()