diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:10:11 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:10:11 +0200 |
commit | c0cdb2ad99a1e2a6ade5ce76c91177a79258e669 (patch) | |
tree | 4701a015385d9a6a5a4ba99a8f1f5d400fff26b1 /file_hierarchy.cpp | |
parent | 3.13 (diff) | |
download | FreeFileSync-c0cdb2ad99a1e2a6ade5ce76c91177a79258e669.tar.gz FreeFileSync-c0cdb2ad99a1e2a6ade5ce76c91177a79258e669.tar.bz2 FreeFileSync-c0cdb2ad99a1e2a6ade5ce76c91177a79258e669.zip |
3.14
Diffstat (limited to 'file_hierarchy.cpp')
-rw-r--r-- | file_hierarchy.cpp | 148 |
1 files changed, 74 insertions, 74 deletions
diff --git a/file_hierarchy.cpp b/file_hierarchy.cpp index 179aa1c5..1681da22 100644 --- a/file_hierarchy.cpp +++ b/file_hierarchy.cpp @@ -122,80 +122,80 @@ SyncOperation FileSystemObject::getSyncOperation( switch (cmpResult) { - case FILE_LEFT_SIDE_ONLY: - switch (syncDir) - { - case SYNC_DIR_INT_LEFT: - return SO_DELETE_LEFT; //delete files on left - case SYNC_DIR_INT_RIGHT: - return SO_CREATE_NEW_RIGHT; //copy files to right - case SYNC_DIR_INT_NONE: - return SO_DO_NOTHING; - case SYNC_DIR_INT_CONFLICT: - return SO_UNRESOLVED_CONFLICT; - } - break; - - case FILE_RIGHT_SIDE_ONLY: - switch (syncDir) - { - case SYNC_DIR_INT_LEFT: - return SO_CREATE_NEW_LEFT; //copy files to left - case SYNC_DIR_INT_RIGHT: - return SO_DELETE_RIGHT; //delete files on right - case SYNC_DIR_INT_NONE: - return SO_DO_NOTHING; - case SYNC_DIR_INT_CONFLICT: - return SO_UNRESOLVED_CONFLICT; - } - break; - - case FILE_LEFT_NEWER: - case FILE_RIGHT_NEWER: - case FILE_DIFFERENT: - switch (syncDir) - { - case SYNC_DIR_INT_LEFT: - return SO_OVERWRITE_LEFT; //copy from right to left - case SYNC_DIR_INT_RIGHT: - return SO_OVERWRITE_RIGHT; //copy from left to right - case SYNC_DIR_INT_NONE: - return SO_DO_NOTHING; - case SYNC_DIR_INT_CONFLICT: - return SO_UNRESOLVED_CONFLICT; - } - break; - - case FILE_CONFLICT: - switch (syncDir) - { - case SYNC_DIR_INT_LEFT: - return SO_OVERWRITE_LEFT; //copy from right to left - case SYNC_DIR_INT_RIGHT: - return SO_OVERWRITE_RIGHT; //copy from left to right - case SYNC_DIR_INT_NONE: - case SYNC_DIR_INT_CONFLICT: - return SO_UNRESOLVED_CONFLICT; - } - break; - - case FILE_DIFFERENT_METADATA: - switch (syncDir) - { - case SYNC_DIR_INT_LEFT: - return SO_COPY_METADATA_TO_LEFT; - case SYNC_DIR_INT_RIGHT: - return SO_COPY_METADATA_TO_RIGHT; - case SYNC_DIR_INT_NONE: - return SO_DO_NOTHING; - case SYNC_DIR_INT_CONFLICT: - return SO_UNRESOLVED_CONFLICT; - } - break; - - case FILE_EQUAL: - assert(syncDir == SYNC_DIR_INT_NONE); - return SO_EQUAL; + case FILE_LEFT_SIDE_ONLY: + switch (syncDir) + { + case SYNC_DIR_INT_LEFT: + return SO_DELETE_LEFT; //delete files on left + case SYNC_DIR_INT_RIGHT: + return SO_CREATE_NEW_RIGHT; //copy files to right + case SYNC_DIR_INT_NONE: + return SO_DO_NOTHING; + case SYNC_DIR_INT_CONFLICT: + return SO_UNRESOLVED_CONFLICT; + } + break; + + case FILE_RIGHT_SIDE_ONLY: + switch (syncDir) + { + case SYNC_DIR_INT_LEFT: + return SO_CREATE_NEW_LEFT; //copy files to left + case SYNC_DIR_INT_RIGHT: + return SO_DELETE_RIGHT; //delete files on right + case SYNC_DIR_INT_NONE: + return SO_DO_NOTHING; + case SYNC_DIR_INT_CONFLICT: + return SO_UNRESOLVED_CONFLICT; + } + break; + + case FILE_LEFT_NEWER: + case FILE_RIGHT_NEWER: + case FILE_DIFFERENT: + switch (syncDir) + { + case SYNC_DIR_INT_LEFT: + return SO_OVERWRITE_LEFT; //copy from right to left + case SYNC_DIR_INT_RIGHT: + return SO_OVERWRITE_RIGHT; //copy from left to right + case SYNC_DIR_INT_NONE: + return SO_DO_NOTHING; + case SYNC_DIR_INT_CONFLICT: + return SO_UNRESOLVED_CONFLICT; + } + break; + + case FILE_CONFLICT: + switch (syncDir) + { + case SYNC_DIR_INT_LEFT: + return SO_OVERWRITE_LEFT; //copy from right to left + case SYNC_DIR_INT_RIGHT: + return SO_OVERWRITE_RIGHT; //copy from left to right + case SYNC_DIR_INT_NONE: + case SYNC_DIR_INT_CONFLICT: + return SO_UNRESOLVED_CONFLICT; + } + break; + + case FILE_DIFFERENT_METADATA: + switch (syncDir) + { + case SYNC_DIR_INT_LEFT: + return SO_COPY_METADATA_TO_LEFT; + case SYNC_DIR_INT_RIGHT: + return SO_COPY_METADATA_TO_RIGHT; + case SYNC_DIR_INT_NONE: + return SO_DO_NOTHING; + case SYNC_DIR_INT_CONFLICT: + return SO_UNRESOLVED_CONFLICT; + } + break; + + case FILE_EQUAL: + assert(syncDir == SYNC_DIR_INT_NONE); + return SO_EQUAL; } return SO_DO_NOTHING; //dummy |