Converts root path of the argument to canonical form, i.e. "C:\" instead of "c:\" on Windows.
| 143 | |
| 144 | //! Converts root path of the argument to canonical form, i.e. "C:\" instead of "c:\" on Windows. |
| 145 | inline fs::path canonicalize_root_path(fs::path const& p) |
| 146 | { |
| 147 | fs::path root_path = p.root_path(); |
| 148 | if (root_path.empty()) |
| 149 | return p; |
| 150 | root_path = fs::canonical(root_path); |
| 151 | fs::path rel_path = p.relative_path(); |
| 152 | if (!rel_path.empty()) |
| 153 | root_path.append(rel_path); |
| 154 | return root_path; |
| 155 | } |
| 156 | |
| 157 | #define CHECK_EXCEPTION(Functor, Expect) throws_fs_error(Functor, Expect, __LINE__) |
| 158 |
no test coverage detected