diff options
| author | Marc Chevrier <marc.chevrier@gmail.com> | 2020-09-20 12:09:30 +0200 |
|---|---|---|
| committer | Marc Chevrier <marc.chevrier@gmail.com> | 2020-09-20 15:17:34 +0200 |
| commit | 82c95083133475531d7f0e00b9e2e36bd0294739 (patch) | |
| tree | 204bfeb4b8b225a7ef7aec1a0eecf24fcad70d1c /Utilities/std | |
| parent | 39a5c0c82c2041a622bcdf19fa3f22abc34b9ae8 (diff) | |
| download | cmake-82c95083133475531d7f0e00b9e2e36bd0294739.tar.gz | |
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 1f52878029..17af643dba 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); |
