diff --git a/doc/release_history.html b/doc/release_history.html
index 9d70ad5de..2bebcb642 100644
--- a/doc/release_history.html
+++ b/doc/release_history.html
@@ -41,7 +41,8 @@
1.85.0
- path::generic_path
and path::generic_string
methods now remove duplicate directory separators in the returned paths. The methods also avoid converting backslashes to forward slashes in root names of the paths. For example, on Windows, path("\\\\?\\c:\\foo").generic_string()
now returns "\\?\c:/foo" instead of "//?/c:/foo". Similarly, path("\\\\host\\share").generic_string()
now returns "\\host/share".
+ path::generic_path
and path::generic_string
methods now remove duplicate directory separators in the returned paths.
+ path::generic_path
, path::generic_string
and path::lexically_normal
avoid converting between backslashes and forward slashes in path root names. For example, on Windows, path("\\\\?\\c:\\foo").generic_string()
now returns "\\?\c:/foo" instead of "//?/c:/foo". Similarly, path("\\\\host/share/foo/..").lexically_normal()
now returns "\\host\share".
1.84.0
diff --git a/src/path.cpp b/src/path.cpp
index 91e345c68..80356c379 100644
--- a/src/path.cpp
+++ b/src/path.cpp
@@ -174,14 +174,6 @@ BOOST_FILESYSTEM_DECL path path_algorithms::lexically_normal_v3(path const& p)
size_type root_dir_pos = find_root_directory_start(pathname, pathname_size, root_name_size);
path normal(pathname, pathname + root_name_size);
-#if defined(BOOST_WINDOWS_API)
- for (size_type i = 0; i < root_name_size; ++i)
- {
- if (normal.m_pathname[i] == path::separator)
- normal.m_pathname[i] = path::preferred_separator;
- }
-#endif
-
size_type root_path_size = root_name_size;
if (root_dir_pos < pathname_size)
{
@@ -272,14 +264,6 @@ BOOST_FILESYSTEM_DECL path path_algorithms::lexically_normal_v4(path const& p)
size_type root_dir_pos = find_root_directory_start(pathname, pathname_size, root_name_size);
path normal(pathname, pathname + root_name_size);
-#if defined(BOOST_WINDOWS_API)
- for (size_type i = 0; i < root_name_size; ++i)
- {
- if (normal.m_pathname[i] == path::separator)
- normal.m_pathname[i] = path::preferred_separator;
- }
-#endif
-
size_type root_path_size = root_name_size;
if (root_dir_pos < pathname_size)
{