Adjustable delta time, to compensate daylight saving times.
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
#include "filenode.h"
|
||||
#include "filenodecmp.h"
|
||||
|
||||
int maxDeltaTime=4000;
|
||||
|
||||
#define QueueNode(queue,node) (queue)->next = node; (queue) = node;
|
||||
|
||||
AccionFileNode *_actionFileNodeFree = NULL;
|
||||
@@ -284,7 +286,7 @@ void AccionFileNode_CheckPair(FileNode *fileNodeLeft, FileNode *fileNodeRight,
|
||||
// Directorios
|
||||
|
||||
// Preparar accion para el par de directorios
|
||||
if (abs(fileNodeLeft->fileTime - fileNodeRight->fileTime) <= 1) { // appoximadamente iguales
|
||||
if (abs(fileNodeLeft->fileTime - fileNodeRight->fileTime) <= maxDeltaTime) { // appoximadamente iguales
|
||||
if (fileNodeRight->estado == FileStatus_Deleted
|
||||
&& fileNodeLeft->estado == FileStatus_Deleted) {
|
||||
actionFileNodeNew->action = AccionFileCmp_Nothing;
|
||||
@@ -337,7 +339,7 @@ void AccionFileNode_CheckPair(FileNode *fileNodeLeft, FileNode *fileNodeRight,
|
||||
// Ficheros
|
||||
|
||||
// Preparar accion para el par de ficheros
|
||||
if (abs(fileNodeLeft->fileTime - fileNodeRight->fileTime) <= 1) { // appoximadamente iguales
|
||||
if (abs(fileNodeLeft->fileTime - fileNodeRight->fileTime) <= maxDeltaTime) { // appoximadamente iguales
|
||||
if (fileNodeRight->estado == FileStatus_Deleted
|
||||
&& fileNodeLeft->estado == FileStatus_Deleted) {
|
||||
actionFileNodeNew->action = AccionFileCmp_Nothing;
|
||||
@@ -439,7 +441,7 @@ void AccionFileNode_Copy(FileNode *fileNodeLeft, FileNode *fileNodeRight,
|
||||
AccionFileNode_CompareChilds(actionFileNodeNew,
|
||||
actionFileNodeQueue, AccionFileNode_Copy);
|
||||
if (abs(fileNodeLeft->fileTime - fileNodeRight->fileTime)
|
||||
<= 1) { // appox. equal
|
||||
<= maxDeltaTime) { // appox. equal
|
||||
actionFileNodeNew->action = AccionFileCmp_Nothing;
|
||||
} else {
|
||||
actionFileNodeNew->action = AccionFileCmp_DateLeftToRight;
|
||||
@@ -454,7 +456,7 @@ void AccionFileNode_Copy(FileNode *fileNodeLeft, FileNode *fileNodeRight,
|
||||
} else {
|
||||
if (fileNodeLeft->estado != FileStatus_Deleted) {
|
||||
if (abs(fileNodeLeft->fileTime - fileNodeRight->fileTime)
|
||||
<= 1) { // appox. equal
|
||||
<= maxDeltaTime) { // appox. equal
|
||||
actionFileNodeNew->action = AccionFileCmp_Nothing;
|
||||
} else {
|
||||
actionFileNodeNew->action = AccionFileCmp_LeftToRight;
|
||||
|
||||
Reference in New Issue
Block a user