diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:04:59 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:04:59 +0200 |
commit | f570e2f2685aa43aa518c2f8578391c1847cddbe (patch) | |
tree | b9376b3a7e807c5e0c4cf3d5615c14034d9675d6 /shared/longPathPrefix.h | |
parent | 3.2 (diff) | |
download | FreeFileSync-f570e2f2685aa43aa518c2f8578391c1847cddbe.tar.gz FreeFileSync-f570e2f2685aa43aa518c2f8578391c1847cddbe.tar.bz2 FreeFileSync-f570e2f2685aa43aa518c2f8578391c1847cddbe.zip |
3.3
Diffstat (limited to 'shared/longPathPrefix.h')
-rw-r--r-- | shared/longPathPrefix.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/shared/longPathPrefix.h b/shared/longPathPrefix.h new file mode 100644 index 00000000..e4834184 --- /dev/null +++ b/shared/longPathPrefix.h @@ -0,0 +1,27 @@ +#ifndef LONGPATHPREFIX_H_INCLUDED +#define LONGPATHPREFIX_H_INCLUDED + +#ifndef FFS_WIN +use in windows build only! +#endif + +#include "zstring.h" + +namespace FreeFileSync +{ + +Zstring resolveRelativePath(const Zstring& path); //throw() + +//handle filenames longer-equal 260 (== MAX_PATH) characters by applying \\?\-prefix (Reference: http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath) +/* +1. path must be absolute +2. if path is smaller than MAX_PATH nothing is changed! +3. path may already contain \\?\-prefix +*/ +Zstring applyLongPathPrefix(const Zstring& path); //throw() +Zstring applyLongPathPrefixCreateDir(const Zstring& path); //throw() -> special rule for ::CreateDirectoryEx(): MAX_PATH - 12(=^ 8.3 filename) is threshold + +Zstring removeLongPathPrefix(const Zstring& path); //throw() +} + +#endif // LONGPATHPREFIX_H_INCLUDED |