From: František Dvořák Date: Tue, 15 Oct 2013 11:35:28 +0000 (+0200) Subject: Insidious error in getParent(), but the bug probably didn't surface. X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=ad8a4a49d2fef46841822159ee1c3881eaa4a2ed;p=dmlite-plugins-vfs.git Insidious error in getParent(), but the bug probably didn't surface. --- 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()) {