Insidious error in getParent(), but the bug probably didn't surface.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Tue, 15 Oct 2013 11:35:28 +0000 (13:35 +0200)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Tue, 15 Oct 2013 11:35:28 +0000 (13:35 +0200)
src/VfsNs.cpp

index 9d62146..855f043 100644 (file)
@@ -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()) {