Index: /trunk/src/VBox/Runtime/common/vfs/vfsbase.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/vfs/vfsbase.cpp	(revision 69815)
+++ /trunk/src/VBox/Runtime/common/vfs/vfsbase.cpp	(revision 69816)
@@ -2688,4 +2688,8 @@
     if (RT_SUCCESS(rc))
     {
+        if (   pPath->fDirSlash
+            || pPath->cComponents == 0)
+            fObjFlags &= ~RTVFSOBJ_F_OPEN_ANY | RTVFSOBJ_F_OPEN_DIRECTORY;
+
         if (pPath->cComponents > 0)
         {
@@ -2706,12 +2710,13 @@
                 if (pPath->fDirSlash)
                 {
-                    RTVFSDIR hVfsDir;
+                    RTVFSDIR hVfsSubDir;
                     RTVfsLockAcquireWrite(pVfsParentDir->Base.hLock);
-                    rc = pVfsParentDir->pOps->pfnOpenDir(pVfsParentDir->Base.pvThis, pszEntryName, 0 /** @todo fFlags*/, &hVfsDir);
+                    rc = pVfsParentDir->pOps->pfnOpenDir(pVfsParentDir->Base.pvThis, pszEntryName,
+                                                         0 /** @todo fFlags*/, &hVfsSubDir);
                     RTVfsLockReleaseWrite(pVfsParentDir->Base.hLock);
                     if (RT_SUCCESS(rc))
                     {
-                        *phVfsObj = RTVfsObjFromDir(hVfsDir);
-                        RTVfsDirRelease(hVfsDir);
+                        *phVfsObj = RTVfsObjFromDir(hVfsSubDir);
+                        RTVfsDirRelease(hVfsSubDir);
                         AssertStmt(*phVfsObj != NIL_RTVFSOBJ, rc = VERR_INTERNAL_ERROR_3);
                     }
