summaryrefslogtreecommitdiff
path: root/shared/long_path_prefix.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:08:42 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:08:42 +0200
commitc32707148292d104c66276b43796d6057c8c7a5d (patch)
treebb83513f4aff24153e21a4ec92e34e4c27651b1f /shared/long_path_prefix.cpp
parent3.9 (diff)
downloadFreeFileSync-c32707148292d104c66276b43796d6057c8c7a5d.tar.gz
FreeFileSync-c32707148292d104c66276b43796d6057c8c7a5d.tar.bz2
FreeFileSync-c32707148292d104c66276b43796d6057c8c7a5d.zip
3.10
Diffstat (limited to 'shared/long_path_prefix.cpp')
-rw-r--r--shared/long_path_prefix.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/shared/long_path_prefix.cpp b/shared/long_path_prefix.cpp
index bc784f70..1c17065c 100644
--- a/shared/long_path_prefix.cpp
+++ b/shared/long_path_prefix.cpp
@@ -9,8 +9,8 @@
//there are two flavors of long path prefix: one for UNC paths, one for regular paths
-const Zstring LONG_PATH_PREFIX = DefaultStr("\\\\?\\");
-const Zstring LONG_PATH_PREFIX_UNC = DefaultStr("\\\\?\\UNC");
+const Zstring LONG_PATH_PREFIX = Zstr("\\\\?\\");
+const Zstring LONG_PATH_PREFIX_UNC = Zstr("\\\\?\\UNC");
template <size_t max_path>
inline
@@ -19,8 +19,8 @@ Zstring applyLongPathPrefixImpl(const Zstring& path)
if ( path.length() >= max_path && //maximum allowed path length without prefix is (MAX_PATH - 1)
!path.StartsWith(LONG_PATH_PREFIX))
{
- if (path.StartsWith(DefaultStr("\\\\"))) //UNC-name, e.g. \\zenju-pc\Users
- return LONG_PATH_PREFIX_UNC + path.AfterFirst(DefaultChar('\\')); //convert to \\?\UNC\zenju-pc\Users
+ if (path.StartsWith(Zstr("\\\\"))) //UNC-name, e.g. \\zenju-pc\Users
+ return LONG_PATH_PREFIX_UNC + path.AfterFirst(Zchar('\\')); //convert to \\?\UNC\zenju-pc\Users
else
return LONG_PATH_PREFIX + path; //prepend \\?\ prefix
}
@@ -49,9 +49,9 @@ Zstring ffs3::removeLongPathPrefix(const Zstring& path) //throw()
{
Zstring finalPath = path;
if (path.StartsWith(LONG_PATH_PREFIX_UNC)) //UNC-name
- finalPath.Replace(LONG_PATH_PREFIX_UNC, DefaultStr("\\"), false);
+ finalPath.Replace(LONG_PATH_PREFIX_UNC, Zstr("\\"), false);
else
- finalPath.Replace(LONG_PATH_PREFIX, DefaultStr(""), false);
+ finalPath.Replace(LONG_PATH_PREFIX, Zstr(""), false);
return finalPath;
}
bgstack15