diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2020-09-20 10:09:30 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2020-09-20 13:17:34 (GMT) |
commit | 82c95083133475531d7f0e00b9e2e36bd0294739 (patch) | |
tree | 204bfeb4b8b225a7ef7aec1a0eecf24fcad70d1c /Utilities/std | |
parent | 39a5c0c82c2041a622bcdf19fa3f22abc34b9ae8 (diff) | |
download | CMake-82c95083133475531d7f0e00b9e2e36bd0294739.zip CMake-82c95083133475531d7f0e00b9e2e36bd0294739.tar.gz CMake-82c95083133475531d7f0e00b9e2e36bd0294739.tar.bz2 |
cmake_path: enhancements
* Fix error on parsing "c:a" (root-name without root-directory)
* Enrich documentation
Diffstat (limited to 'Utilities/std')
-rw-r--r-- | Utilities/std/cm/bits/fs_path.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Utilities/std/cm/bits/fs_path.cxx b/Utilities/std/cm/bits/fs_path.cxx index 1f52878..17af643 100644 --- a/Utilities/std/cm/bits/fs_path.cxx +++ b/Utilities/std/cm/bits/fs_path.cxx @@ -181,9 +181,10 @@ public: if (posSep == rend) { this->set_state(state::in_root_dir); } else { - auto pos = this->consume_root_name(posSep, rend, true); + auto pos = this->consume_root_name(posSep ? posSep : rstart, rend, + posSep != nullptr); if (pos == rend) { - this->set_state(state::in_root_dir); + this->set_state(posSep ? state::in_root_dir : state::in_root_name); } else { this->consume_filename(posSep, rend); this->set_state(state::in_filename); |