diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:07:43 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:07:43 +0200 |
commit | 4226e548662339ea1ca37b45385a7cf9b237ff1e (patch) | |
tree | 9a3fa54b85d97f05164e41bdb96b82f748a37342 /structures.h | |
parent | 3.7 (diff) | |
download | FreeFileSync-4226e548662339ea1ca37b45385a7cf9b237ff1e.tar.gz FreeFileSync-4226e548662339ea1ca37b45385a7cf9b237ff1e.tar.bz2 FreeFileSync-4226e548662339ea1ca37b45385a7cf9b237ff1e.zip |
3.8
Diffstat (limited to 'structures.h')
-rw-r--r-- | structures.h | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/structures.h b/structures.h index c8a67393..f5a0517c 100644 --- a/structures.h +++ b/structures.h @@ -51,6 +51,17 @@ enum CompareDirResult DIR_EQUAL = FILE_EQUAL }; +//attention make sure these /|\ \|/ two enums match!!! +enum CompareSymlinkResult +{ + SYMLINK_LEFT_SIDE_ONLY = FILE_LEFT_SIDE_ONLY, + SYMLINK_RIGHT_SIDE_ONLY = FILE_RIGHT_SIDE_ONLY, + SYMLINK_LEFT_NEWER = FILE_LEFT_NEWER, + SYMLINK_RIGHT_NEWER = FILE_RIGHT_NEWER, + SYMLINK_EQUAL = FILE_EQUAL, + SYMLINK_CONFLICT = FILE_CONFLICT +}; + inline CompareFilesResult convertToFilesResult(CompareDirResult value) @@ -59,6 +70,12 @@ CompareFilesResult convertToFilesResult(CompareDirResult value) } +inline +CompareFilesResult convertToFilesResult(CompareSymlinkResult value) +{ + return static_cast<CompareFilesResult>(value); +} + wxString getDescription(CompareFilesResult cmpRes); wxString getSymbol(CompareFilesResult cmpRes); @@ -259,13 +276,19 @@ struct FolderPairEnh //enhanced folder pairs with (optional) alternate configura }; +enum SymLinkHandling +{ + SYMLINK_IGNORE, + SYMLINK_USE_DIRECTLY, + SYMLINK_FOLLOW_LINK +}; + + struct MainConfiguration { MainConfiguration() : compareVar(CMP_BY_TIME_SIZE), - processSymlinks(false), - traverseDirectorySymlinks(true), - copyFileSymlinks(false), + handleSymlinks(SYMLINK_IGNORE), globalFilter(DefaultStr("*"), standardExcludeFilter()), handleDeletion(MOVE_TO_RECYCLE_BIN) {} @@ -275,9 +298,7 @@ struct MainConfiguration //Compare setting CompareVariant compareVar; - bool processSymlinks; //include Symbolic links into file listing at all? - bool traverseDirectorySymlinks; //traverse dir symlinks <=> not copying symlink - bool copyFileSymlinks; //copy symbolic link instead of target file + SymLinkHandling handleSymlinks; //Synchronisation settings SyncConfiguration syncConfiguration; @@ -298,9 +319,7 @@ struct MainConfiguration return firstPair == other.firstPair && additionalPairs == other.additionalPairs && compareVar == other.compareVar && - processSymlinks == other.processSymlinks && - traverseDirectorySymlinks == other.traverseDirectorySymlinks && - copyFileSymlinks == other.copyFileSymlinks && + handleSymlinks == other.handleSymlinks && syncConfiguration == other.syncConfiguration && globalFilter == other.globalFilter && hidden == other.hidden && |