Change-Id: I44700728866ffef5728bc45433455059a9eb882f
// EXTERNAL INCLUDES
#include <cstdio>
#include <cmath>
+#include <sys/stat.h>
// INTERNAL INCLUDES
#include <base/environment-options.h>
float fps = mFrameCount / mElapsedTime;
DALI_LOG_FPS("Frame count %.0f, elapsed time %.1fs, FPS: %.2f\n", mFrameCount, mElapsedTime, fps );
+ struct stat fileStat;
+
+ // Check file path
+ if( lstat( DALI_TEMP_UPDATE_FPS_FILE, &fileStat ) != 0 )
+ {
+ return;
+ }
+
+ if( !S_ISREG( fileStat.st_mode ) )
+ {
+ return;
+ }
+
// Dumps out the frame rate.
FILE* outfile = fopen( DALI_TEMP_UPDATE_FPS_FILE, "w" );
if( outfile )