Commit 1ac7f2e8 authored by Mark Olesen's avatar Mark Olesen
Browse files

BUG: wrong nanoseconds in highResLastModified (closes #794)

- was using st_atim instead of st_mtim for the nanoseconds

- value of followLink was being ignored (it was always being followed).
parent 1eb2458c
......@@ -57,10 +57,10 @@ Description
#include <sys/stat.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <dlfcn.h>
#include <link.h>
#include <netinet/in.h>
#ifdef USE_RANDOM
#include <climits>
#if INT_MAX != 2147483647
......@@ -708,12 +708,12 @@ double Foam::highResLastModified(const fileName& name, const bool followLink)
// Ignore an empty name
if (!name.empty())
{
fileStat fileStatus(name);
fileStat fileStatus(name, followLink);
if (fileStatus.isValid())
{
return
fileStatus.status().st_mtime
+ 1e-9*fileStatus.status().st_atim.tv_nsec;
+ 1e-9*fileStatus.status().st_mtim.tv_nsec;
}
}
......
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