From ad8a4a49d2fef46841822159ee1c3881eaa4a2ed Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Tue, 15 Oct 2013 13:35:28 +0200 Subject: [PATCH] Insidious error in getParent(), but the bug probably didn't surface. --- src/VfsNs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/VfsNs.cpp b/src/VfsNs.cpp index 9d62146..855f043 100644 --- a/src/VfsNs.cpp +++ b/src/VfsNs.cpp @@ -823,7 +823,8 @@ ExtendedStat VfsCatalog::getParent(const std::string& path, *name = components.back(); components.pop_back(); - *parentPath = Url::joinPath(components); + if (components.size() == 1 && components[0] == "/") *parentPath = "/"; + else *parentPath = Url::joinPath(components); // Get the files now if (!parentPath->empty()) { -- 1.8.2.3