Browse Source

Don't show hostname on file scheme

pull/2/head
tomleb 5 years ago
parent
commit
e07ec134bd
  1. 7
      src/URL.cpp

7
src/URL.cpp

@ -241,7 +241,12 @@ std::string URL::toString() const { @@ -241,7 +241,12 @@ std::string URL::toString() const {
if (isRelative()) {
return path;
}
return scheme + "://" + host + path;
/* File is most likely gonna be localhost, we don't wanna print it .. */
if (scheme == "file") {
return scheme + "://" + path;
} else {
return scheme + "://" + host + path;
}
}
bool URL::isRelative() const {

Loading…
Cancel
Save