diff --git a/met/src/basic/vx_log/file_fxns.cc b/met/src/basic/vx_log/file_fxns.cc index 16a98ce261..49a5fec382 100644 --- a/met/src/basic/vx_log/file_fxns.cc +++ b/met/src/basic/vx_log/file_fxns.cc @@ -28,8 +28,7 @@ using namespace std; bool is_regular_file(const char *path) { struct stat path_stat; - stat(path, &path_stat); - return(S_ISREG(path_stat.st_mode)); + return(!stat(path, &path_stat) && S_ISREG(path_stat.st_mode)); } ////////////////////////////////////////////////////////////////////////