3D: Make file test more portable

This commit is contained in:
Simon Richter 2016-04-06 22:41:24 -04:00 committed by Chris Pavlina
parent 9f420e0e76
commit 6a65341599
1 changed files with 1 additions and 7 deletions

View File

@ -514,13 +514,7 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* aCacheItem )
if( wxFileName::Exists( fname ) )
{
// determine if the file is a regular file
struct stat info;
if( stat( fname.ToUTF8(), &info ) )
return false;
if( !S_ISREG( info.st_mode ) )
if( !wxFileName::FileExists( fname ) )
{
wxString errmsg = _( "path exists but is not a regular file" );
wxLogTrace( MASK_3D_CACHE, " * [3D model] %s '%s'\n", errmsg.ToUTF8(),