Commit 95e0f93e authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

win32: Fix stat() usage

parent f1fb6bdf
......@@ -60,7 +60,7 @@ unsigned int Directory::lastModificationDate() const
{
struct _stat32 s;
_stat32( m_path.c_str(), &s );
if ( S_ISDIR( s.st_mode ) == false )
if ( ( S_IFDIR & s.st_mode ) == 0 )
throw std::runtime_error( "The provided path isn't a directory" );
m_lastModificationDate = s.st_mtime;
}
......
......@@ -39,7 +39,7 @@ unsigned int File::lastModificationDate() const
{
if ( m_lastModificationDate == 0 )
{
struct _stat32 s;
struct _stat s;
if ( _stat( m_fullPath.c_str(), &s ) )
throw std::runtime_error( "Failed to get file stats" );
m_lastModificationDate = s.st_mtime;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment