Index: trunk/src/VBox/Runtime/common/fs/fatvfs.cpp
===================================================================
--- trunk/src/VBox/Runtime/common/fs/fatvfs.cpp	(revision 69826)
+++ trunk/src/VBox/Runtime/common/fs/fatvfs.cpp	(revision 69828)
@@ -507,4 +507,5 @@
 static int  rtFsFatDirShrd_PutEntryAfterUpdate(PRTFSFATDIRSHRD pThis, PFATDIRENTRY pDirEntry, uint32_t uWriteLock);
 static int  rtFsFatDirShrd_Flush(PRTFSFATDIRSHRD pThis);
+static int  rtFsFatDir_NewWithShared(PRTFSFATVOL pThis, PRTFSFATDIRSHRD pShared, PRTVFSDIR phVfsDir);
 static int  rtFsFatDir_New(PRTFSFATVOL pThis, PRTFSFATDIRSHRD pParentDir, PCFATDIRENTRY pDirEntry, uint32_t offEntryInDir,
                            uint32_t idxCluster, uint64_t offDisk, uint32_t cbDir, PRTVFSDIR phVfsDir);
@@ -4006,4 +4007,47 @@
     PRTFSFATDIR     pThis   = (PRTFSFATDIR)pvThis;
     PRTFSFATDIRSHRD pShared = pThis->pShared;
+    int             rc;
+
+    /*
+     * Special cases '.' and '.'
+     */
+    if (pszEntry[0] == '.')
+    {
+        PRTFSFATDIRSHRD pSharedToOpen;
+        if (pszEntry[1] == '\0')
+            pSharedToOpen = pShared;
+        else if (pszEntry[1] == '.' && pszEntry[2] == '\0')
+        {
+            pSharedToOpen = pShared->Core.pParentDir;
+            if (!pSharedToOpen)
+                pSharedToOpen = pShared;
+        }
+        else
+            pSharedToOpen = NULL;
+        if (pSharedToOpen)
+        {
+            if (fFlags & RTVFSOBJ_F_OPEN_DIRECTORY)
+            {
+                if (   (fOpen & RTFILE_O_ACTION_MASK) == RTFILE_O_OPEN
+                    || (fOpen & RTFILE_O_ACTION_MASK) == RTFILE_O_OPEN_CREATE)
+                {
+                    rtFsFatDirShrd_Retain(pSharedToOpen);
+                    RTVFSDIR hVfsDir;
+                    rc = rtFsFatDir_NewWithShared(pShared->Core.pVol, pSharedToOpen, &hVfsDir);
+                    if (RT_SUCCESS(rc))
+                    {
+                        *phVfsObj = RTVfsObjFromDir(hVfsDir);
+                        RTVfsDirRelease(hVfsDir);
+                        AssertStmt(*phVfsObj != NIL_RTVFSOBJ, rc = VERR_INTERNAL_ERROR_3);
+                    }
+                }
+                else
+                    rc = VERR_ACCESS_DENIED;
+            }
+            else
+                rc = VERR_IS_A_DIRECTORY;
+            return rc;
+        }
+    }
 
     /*
@@ -4013,5 +4057,5 @@
     bool        fLong;
     FATDIRENTRY DirEntry;
-    int rc = rtFsFatDirShrd_FindEntry(pShared, pszEntry, &offEntryInDir, &fLong, &DirEntry);
+    rc = rtFsFatDirShrd_FindEntry(pShared, pszEntry, &offEntryInDir, &fLong, &DirEntry);
     if (RT_SUCCESS(rc))
     {
@@ -4195,44 +4239,4 @@
 
 /**
- * @interface_method_impl{RTVFSDIROPS,pfnOpenDir}
- */
-static DECLCALLBACK(int) rtFsFatDir_OpenDir(void *pvThis, const char *pszSubDir, uint32_t fFlags, PRTVFSDIR phVfsDir)
-{
-    PRTFSFATDIR     pThis   = (PRTFSFATDIR)pvThis;
-    PRTFSFATDIRSHRD pShared = pThis->pShared;
-    AssertReturn(!fFlags, VERR_INVALID_FLAGS);
-
-    /*
-     * Try open directory.
-     */
-    uint32_t    offEntryInDir;
-    bool        fLong;
-    FATDIRENTRY DirEntry;
-    int rc = rtFsFatDirShrd_FindEntry(pShared, pszSubDir, &offEntryInDir, &fLong, &DirEntry);
-    LogFlow(("rtFsFatDir_OpenDir: FindEntry(,%s,,,) -> %Rrc fLong=%d offEntryInDir=%#RX32\n", pszSubDir, rc, fLong, offEntryInDir));
-    if (RT_SUCCESS(rc))
-    {
-        switch (DirEntry.fAttrib & (FAT_ATTR_DIRECTORY | FAT_ATTR_VOLUME))
-        {
-            case FAT_ATTR_DIRECTORY:
-                rc = rtFsFatDir_New(pShared->Core.pVol, pShared, &DirEntry, offEntryInDir,
-                                    RTFSFAT_GET_CLUSTER(&DirEntry, pShared->Core.pVol), UINT64_MAX /*offDisk*/,
-                                    DirEntry.cbFile, phVfsDir);
-                break;
-
-            case 0:
-                rc = VERR_NOT_A_DIRECTORY;
-                break;
-
-            default:
-                rc = VERR_PATH_NOT_FOUND;
-                break;
-        }
-    }
-    return rc;
-}
-
-
-/**
  * @interface_method_impl{RTVFSDIROPS,pfnCreateDir}
  */
@@ -4252,4 +4256,8 @@
     if (rc != VERR_FILE_NOT_FOUND)
         return RT_SUCCESS(rc) ? VERR_ALREADY_EXISTS : rc;
+
+    if (   strcmp(pszSubDir, ".") == 0
+        || strcmp(pszSubDir, "..") == 0)
+        return VERR_ALREADY_EXISTS;
 
     /*
@@ -4287,4 +4295,5 @@
 
 
+#if 0
 /**
  * @interface_method_impl{RTVFSDIROPS,pfnQueryEntryInfo}
@@ -4316,4 +4325,5 @@
     return rc;
 }
+#endif
 
 
@@ -4725,9 +4735,9 @@
     NULL /* pfnFollowAbsoluteSymlink */,
     rtFsFatDir_OpenFile,
-    rtFsFatDir_OpenDir,
+    NULL /* pfnOpenDir */,
     rtFsFatDir_CreateDir,
     rtFsFatDir_OpenSymlink,
     rtFsFatDir_CreateSymlink,
-    rtFsFatDir_QueryEntryInfo,
+    NULL /* pfnQueryEntryInfo */,
     rtFsFatDir_UnlinkEntry,
     rtFsFatDir_RenameEntry,
Index: trunk/src/VBox/Runtime/common/fs/isovfs.cpp
===================================================================
--- trunk/src/VBox/Runtime/common/fs/isovfs.cpp	(revision 69826)
+++ trunk/src/VBox/Runtime/common/fs/isovfs.cpp	(revision 69828)
@@ -461,4 +461,5 @@
 static void rtFsIsoDirShrd_AddOpenChild(PRTFSISODIRSHRD pDir, PRTFSISOCORE pChild);
 static void rtFsIsoDirShrd_RemoveOpenChild(PRTFSISODIRSHRD pDir, PRTFSISOCORE pChild);
+static int  rtFsIsoDir_NewWithShared(PRTFSISOVOL pThis, PRTFSISODIRSHRD pShared, PRTVFSDIR phVfsDir);
 static int  rtFsIsoDir_New9660(PRTFSISOVOL pThis, PRTFSISODIRSHRD pParentDir, PCISO9660DIRREC pDirRec,
                                uint32_t cDirRecs, uint64_t offDirRec, PRTVFSDIR phVfsDir);
@@ -2897,18 +2898,57 @@
     PRTFSISODIROBJ  pThis   = (PRTFSISODIROBJ)pvThis;
     PRTFSISODIRSHRD pShared = pThis->pShared;
+    int rc;
 
     /*
      * We cannot create or replace anything, just open stuff.
      */
-    if (   (fOpen & RTFILE_O_ACTION_MASK) == RTFILE_O_CREATE
-        || (fOpen & RTFILE_O_ACTION_MASK) == RTFILE_O_CREATE_REPLACE)
+    if (   (fOpen & RTFILE_O_ACTION_MASK) == RTFILE_O_OPEN
+        || (fOpen & RTFILE_O_ACTION_MASK) == RTFILE_O_OPEN_CREATE)
+    { /* likely */ }
+    else
         return VERR_WRITE_PROTECT;
 
     /*
+     * Special cases '.' and '.'
+     */
+    if (pszEntry[0] == '.')
+    {
+        PRTFSISODIRSHRD pSharedToOpen;
+        if (pszEntry[1] == '\0')
+            pSharedToOpen = pShared;
+        else if (pszEntry[1] == '.' && pszEntry[2] == '\0')
+        {
+            pSharedToOpen = pShared->Core.pParentDir;
+            if (!pSharedToOpen)
+                pSharedToOpen = pShared;
+        }
+        else
+            pSharedToOpen = NULL;
+        if (pSharedToOpen)
+        {
+            if (fFlags & RTVFSOBJ_F_OPEN_DIRECTORY)
+            {
+                rtFsIsoDirShrd_Retain(pSharedToOpen);
+                RTVFSDIR hVfsDir;
+                rc = rtFsIsoDir_NewWithShared(pShared->Core.pVol, pSharedToOpen, &hVfsDir);
+                if (RT_SUCCESS(rc))
+                {
+                    *phVfsObj = RTVfsObjFromDir(hVfsDir);
+                    RTVfsDirRelease(hVfsDir);
+                    AssertStmt(*phVfsObj != NIL_RTVFSOBJ, rc = VERR_INTERNAL_ERROR_3);
+                }
+            }
+            else
+                rc = VERR_IS_A_DIRECTORY;
+            return rc;
+        }
+    }
+
+    /*
      * Try open whatever it is.
      */
-    int rc;
     if (pShared->Core.pVol->enmType != RTFSISOVOLTYPE_UDF)
     {
+
         /*
          * ISO 9660
@@ -3112,4 +3152,5 @@
 
 
+#if 0
 /**
  * @interface_method_impl{RTVFSDIROPS,pfnOpenDir}
@@ -3185,4 +3226,5 @@
     return rc;
 }
+#endif
 
 
@@ -3218,4 +3260,5 @@
 
 
+#if 0
 /**
  * @interface_method_impl{RTVFSDIROPS,pfnQueryEntryInfo}
@@ -3281,4 +3324,5 @@
     return rc;
 }
+#endif
 
 
@@ -3693,9 +3737,9 @@
     NULL /* pfnFollowAbsoluteSymlink */,
     rtFsIsoDir_OpenFile,
-    rtFsIsoDir_OpenDir,
+    NULL /* pfnOpenDir */,
     rtFsIsoDir_CreateDir,
     rtFsIsoDir_OpenSymlink,
     rtFsIsoDir_CreateSymlink,
-    rtFsIsoDir_QueryEntryInfo,
+    NULL /* pfnQueryEntryInfo */,
     rtFsIsoDir_UnlinkEntry,
     rtFsIsoDir_RenameEntry,
