From 755b2a25356817fce92672d7317b7a5caad12000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 29 Dec 2023 00:40:16 +0100 Subject: [PATCH] Fix check for navigating upwards from http Paths --- Common/File/Path.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/File/Path.cpp b/Common/File/Path.cpp index a3d773f74040..b9db9aba2cbb 100644 --- a/Common/File/Path.cpp +++ b/Common/File/Path.cpp @@ -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; }