Mark deleted nodes with the current date
This commit is contained in:
@@ -98,6 +98,10 @@ void FileNode_AddChild(FileNode fileNode, FileNode fileNodeChild) {
|
|||||||
void FileNode_SetStatusRec(FileNode fileNode, FileStatus status) {
|
void FileNode_SetStatusRec(FileNode fileNode, FileStatus status) {
|
||||||
FileNode fileNodeChild;
|
FileNode fileNodeChild;
|
||||||
fileNode->status = status;
|
fileNode->status = status;
|
||||||
|
if (status == FileStatus_Deleted) {
|
||||||
|
fileNode->fileTime = Time_GetTime();
|
||||||
|
fileNode->flags |= FileFlag_HasTime;
|
||||||
|
}
|
||||||
fileNodeChild = fileNode->child;
|
fileNodeChild = fileNode->child;
|
||||||
while (fileNodeChild != NULL) {
|
while (fileNodeChild != NULL) {
|
||||||
FileNode_SetStatusRec(fileNodeChild, status);
|
FileNode_SetStatusRec(fileNodeChild, status);
|
||||||
|
|||||||
@@ -316,15 +316,9 @@ void AccionFileNode_SyncPair(FileNode fileNodeLeft, FileNode fileNodeRight,
|
|||||||
}
|
}
|
||||||
else if (fileNodeRight->status == FileStatus_Deleted) {
|
else if (fileNodeRight->status == FileStatus_Deleted) {
|
||||||
actionFileNodeNew->action = ActionFileCmp_DeleteLeft;
|
actionFileNodeNew->action = ActionFileCmp_DeleteLeft;
|
||||||
if (fileNodeLeft->status == FileStatus_Deleted) {
|
|
||||||
actionFileNodeNew->action = ActionFileCmp_Nothing;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (fileNodeLeft->status == FileStatus_Deleted) {
|
else if (fileNodeLeft->status == FileStatus_Deleted) {
|
||||||
actionFileNodeNew->action = ActionFileCmp_DeleteRight;
|
actionFileNodeNew->action = ActionFileCmp_DeleteRight;
|
||||||
if (fileNodeRight->status == FileStatus_Deleted) {
|
|
||||||
actionFileNodeNew->action = ActionFileCmp_Nothing;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
actionFileNodeNew->action = ActionFileCmp_Nothing;
|
actionFileNodeNew->action = ActionFileCmp_Nothing;
|
||||||
@@ -377,15 +371,9 @@ void AccionFileNode_SyncPair(FileNode fileNodeLeft, FileNode fileNodeRight,
|
|||||||
}
|
}
|
||||||
else if (fileNodeRight->status == FileStatus_Deleted) {
|
else if (fileNodeRight->status == FileStatus_Deleted) {
|
||||||
actionFileNodeNew->action = ActionFileCmp_DeleteLeft;
|
actionFileNodeNew->action = ActionFileCmp_DeleteLeft;
|
||||||
if (fileNodeLeft->status == FileStatus_Deleted) {
|
|
||||||
actionFileNodeNew->action = ActionFileCmp_Nothing;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (fileNodeLeft->status == FileStatus_Deleted) {
|
else if (fileNodeLeft->status == FileStatus_Deleted) {
|
||||||
actionFileNodeNew->action = ActionFileCmp_DeleteRight;
|
actionFileNodeNew->action = ActionFileCmp_DeleteRight;
|
||||||
if (fileNodeRight->status == FileStatus_Deleted) {
|
|
||||||
actionFileNodeNew->action = ActionFileCmp_Nothing;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
actionFileNodeNew->action = ActionFileCmp_Nothing;
|
actionFileNodeNew->action = ActionFileCmp_Nothing;
|
||||||
|
|||||||
Reference in New Issue
Block a user