Merge "Consider that some Java version on Linux only return integral timestamps"
This commit is contained in:
commit
0421481978
|
@ -759,7 +759,10 @@ public MetadataDiff compareMetadata(DirCacheEntry entry) {
|
||||||
long fileLastModified = getEntryLastModified();
|
long fileLastModified = getEntryLastModified();
|
||||||
if (cacheLastModified % 1000 == 0)
|
if (cacheLastModified % 1000 == 0)
|
||||||
fileLastModified = fileLastModified - fileLastModified % 1000;
|
fileLastModified = fileLastModified - fileLastModified % 1000;
|
||||||
|
// Some Java version on Linux return whole seconds only even when
|
||||||
|
// the file systems supports more precision.
|
||||||
|
else if (fileLastModified % 1000 == 0)
|
||||||
|
cacheLastModified = cacheLastModified - cacheLastModified % 1000;
|
||||||
if (fileLastModified != cacheLastModified)
|
if (fileLastModified != cacheLastModified)
|
||||||
return MetadataDiff.DIFFER_BY_TIMESTAMP;
|
return MetadataDiff.DIFFER_BY_TIMESTAMP;
|
||||||
else if (!entry.isSmudged())
|
else if (!entry.isSmudged())
|
||||||
|
|
Loading…
Reference in New Issue