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) {
|
||||
FileNode fileNodeChild;
|
||||
fileNode->status = status;
|
||||
if (status == FileStatus_Deleted) {
|
||||
fileNode->fileTime = Time_GetTime();
|
||||
fileNode->flags |= FileFlag_HasTime;
|
||||
}
|
||||
fileNodeChild = fileNode->child;
|
||||
while (fileNodeChild != NULL) {
|
||||
FileNode_SetStatusRec(fileNodeChild, status);
|
||||
|
||||
@@ -316,15 +316,9 @@ void AccionFileNode_SyncPair(FileNode fileNodeLeft, FileNode fileNodeRight,
|
||||
}
|
||||
else if (fileNodeRight->status == FileStatus_Deleted) {
|
||||
actionFileNodeNew->action = ActionFileCmp_DeleteLeft;
|
||||
if (fileNodeLeft->status == FileStatus_Deleted) {
|
||||
actionFileNodeNew->action = ActionFileCmp_Nothing;
|
||||
}
|
||||
}
|
||||
else if (fileNodeLeft->status == FileStatus_Deleted) {
|
||||
actionFileNodeNew->action = ActionFileCmp_DeleteRight;
|
||||
if (fileNodeRight->status == FileStatus_Deleted) {
|
||||
actionFileNodeNew->action = ActionFileCmp_Nothing;
|
||||
}
|
||||
}
|
||||
else {
|
||||
actionFileNodeNew->action = ActionFileCmp_Nothing;
|
||||
@@ -377,15 +371,9 @@ void AccionFileNode_SyncPair(FileNode fileNodeLeft, FileNode fileNodeRight,
|
||||
}
|
||||
else if (fileNodeRight->status == FileStatus_Deleted) {
|
||||
actionFileNodeNew->action = ActionFileCmp_DeleteLeft;
|
||||
if (fileNodeLeft->status == FileStatus_Deleted) {
|
||||
actionFileNodeNew->action = ActionFileCmp_Nothing;
|
||||
}
|
||||
}
|
||||
else if (fileNodeLeft->status == FileStatus_Deleted) {
|
||||
actionFileNodeNew->action = ActionFileCmp_DeleteRight;
|
||||
if (fileNodeRight->status == FileStatus_Deleted) {
|
||||
actionFileNodeNew->action = ActionFileCmp_Nothing;
|
||||
}
|
||||
}
|
||||
else {
|
||||
actionFileNodeNew->action = ActionFileCmp_Nothing;
|
||||
|
||||
Reference in New Issue
Block a user