Skip to content

Commit

Permalink
Fix check for navigating upwards from http Paths
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Dec 28, 2023
1 parent cd00d06 commit 755b2a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Common/File/Path.cpp
Expand Up @@ -320,7 +320,7 @@ bool Path::CanNavigateUp() const {
}
if (type_ == PathType::HTTP) {
size_t rootSlash = path_.find_first_of('/', strlen("https://"));
if (rootSlash == path_.npos || path_.size() < rootSlash + 1) {
if (rootSlash == path_.npos || path_.size() == rootSlash + 1) {
// This means, "http://server" or "http://server/". Can't go up.
return false;
}
Expand Down

0 comments on commit 755b2a2

Please sign in to comment.