From: František Dvořák Date: Thu, 10 Oct 2013 20:41:07 +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=060408f9a8c1691cc624156811256b32da1eb177;p=dmlite-plugins-vfs-old.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()) {