gopher: Fix for 0-length path
This is the case for urls like gopher://gophernicus.org (without trailing /), which ended up being downloaded instead of displayed.
This commit is contained in:
parent
b7e55f797d
commit
35edaf281f
|
@ -193,7 +193,7 @@ BGopherRequest::BGopherRequest(const BUrl& url, BUrlProtocolListener* listener,
|
||||||
// the first part of the path is actually the document type
|
// the first part of the path is actually the document type
|
||||||
|
|
||||||
fPath = Url().Path();
|
fPath = Url().Path();
|
||||||
if (!Url().HasPath() || (fPath.Length() == 1 && fPath[0] == '/')) {
|
if (!Url().HasPath() || fPath.Length() == 0 || fPath == "/") {
|
||||||
// default entry
|
// default entry
|
||||||
fItemType = GOPHER_TYPE_DIRECTORY;
|
fItemType = GOPHER_TYPE_DIRECTORY;
|
||||||
fPath = "";
|
fPath = "";
|
||||||
|
|
Loading…
Reference in New Issue