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:
parent
6ed6d97bfe
commit
20463b2e69
3 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue