master
Daniel Kolesa 2018-04-14 23:33:42 +02:00
parent 2f180cfc0e
commit 2f42383fcd
1 changed files with 5 additions and 1 deletions

View File

@ -145,7 +145,8 @@ struct path {
std::string root() const {
if (has_root()) {
return std::string{1, separator()};
char sep = separator();
return std::string{&sep, 1};
}
return "";
}
@ -248,6 +249,9 @@ struct path {
}
path relative_to(path other) const {
if (other.p_path == ".") {
return *this;
}
if (other.p_fmt != p_fmt) {
other = path{other, p_fmt};
}