Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2020-11-23 13:38:05 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2020-11-23 13:38:05 +0300
commitc94058ff0de488f7e161c322e66b7872f2b7d568 (patch)
tree848378c0a49d3a296867e6fc08a79f2ba1bce8c6 /include
parentd79e28a725ae84d7b9e86ed4edf22c89a4434cc0 (diff)
Yet another path view fix.
Diffstat (limited to 'include')
-rw-r--r--include/llfio/v2.0/path_view.hpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/llfio/v2.0/path_view.hpp b/include/llfio/v2.0/path_view.hpp
index 18ff29e6..f6aa179a 100644
--- a/include/llfio/v2.0/path_view.hpp
+++ b/include/llfio/v2.0/path_view.hpp
@@ -1815,12 +1815,10 @@ public:
}
return this->_invoke([sep_idx, this](auto v) {
return path_view(v.data(),
-#ifdef _WIN32
- (sep_idx + 1) // On Windows, a terminating separator is significant, so it is not removed.
-#elif LLFIO_USING_EXPERIMENTAL_FILESYSTEM
- (v.size() - 1 == sep_idx) ? sep_idx : (sep_idx + 1)
-#else
+#if LLFIO_USING_EXPERIMENTAL_FILESYSTEM
(v.size() - 1 == sep_idx || sep_idx > 0) ? sep_idx : (sep_idx + 1)
+#else
+ (sep_idx + 1)
#endif
,
not_zero_terminated, formatting());
@@ -1972,7 +1970,7 @@ public:
return this->_invoke(
[this, sep_idx](const auto &v) { return path_view(v.data(), (sep_idx == 0 && this->_length > 1) ? 1 : sep_idx, not_zero_terminated, formatting()); });
#else
- return this->_invoke([this, sep_idx](const auto &v) { return path_view(v.data(), (sep_idx == 0) ? 1 : sep_idx, not_zero_terminated, formatting()); });
+ return this->_invoke([this, sep_idx](const auto &v) { return path_view(v.data(), (sep_idx == 0) ? 1 : sep_idx, not_zero_terminated, formatting()); });
#endif
}
//! Returns a view of the filename part of this view.