Index: trunk/src/VBox/Devices/Storage/VBoxHDD.cpp
===================================================================
--- trunk/src/VBox/Devices/Storage/VBoxHDD.cpp	(revision 25291)
+++ trunk/src/VBox/Devices/Storage/VBoxHDD.cpp	(revision 25292)
@@ -651,5 +651,5 @@
     }
 
-    while ((rc = RTDirReadEx(pPluginDir, pPluginDirEntry, &cbPluginDirEntry, RTFSOBJATTRADD_NOTHING)) != VERR_NO_MORE_FILES)
+    while ((rc = RTDirReadEx(pPluginDir, pPluginDirEntry, &cbPluginDirEntry, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK)) != VERR_NO_MORE_FILES)
     {
         RTLDRMOD hPlugin = NIL_RTLDRMOD;
@@ -664,5 +664,5 @@
             pPluginDirEntry = (PRTDIRENTRYEX)RTMemAllocZ(cbPluginDirEntry);
             /* Retry. */
-            rc = RTDirReadEx(pPluginDir, pPluginDirEntry, &cbPluginDirEntry, RTFSOBJATTRADD_NOTHING);
+            rc = RTDirReadEx(pPluginDir, pPluginDirEntry, &cbPluginDirEntry, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
             if (RT_FAILURE(rc))
                 break;
Index: trunk/src/VBox/HostServices/SharedFolders/testcase/tstShflCase.cpp
===================================================================
--- trunk/src/VBox/HostServices/SharedFolders/testcase/tstShflCase.cpp	(revision 25291)
+++ trunk/src/VBox/HostServices/SharedFolders/testcase/tstShflCase.cpp	(revision 25292)
@@ -126,6 +126,7 @@
 }
 
-int rtDirReadEx(PRTDIR pDir, PRTDIRENTRYEX pDirEntry, size_t *pcbDirEntry, RTFSOBJATTRADD enmAdditionalAttribs)
-{
+int rtDirReadEx(PRTDIR pDir, PRTDIRENTRYEX pDirEntry, size_t *pcbDirEntry, RTFSOBJATTRADD enmAdditionalAttribs, uint32_t fFlags)
+{
+    NOREF(fFlags);
     switch(iDirList)
     {
@@ -229,5 +230,5 @@
         size_t cbDirEntrySize = cbDirEntry;
 
-        rc = RTDirReadEx(hSearch, pDirEntry, &cbDirEntrySize, RTFSOBJATTRADD_NOTHING);
+        rc = RTDirReadEx(hSearch, pDirEntry, &cbDirEntrySize, RTFSOBJATTRADD_NOTHING, RTPATH_F_FOLLOW_LINK);
         if (rc == VERR_NO_MORE_FILES)
             break;
Index: trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp
===================================================================
--- trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp	(revision 25291)
+++ trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp	(revision 25292)
@@ -143,5 +143,5 @@
         size_t cbDirEntrySize = cbDirEntry;
 
-        rc = RTDirReadEx(hSearch, pDirEntry, &cbDirEntrySize, RTFSOBJATTRADD_NOTHING);
+        rc = RTDirReadEx(hSearch, pDirEntry, &cbDirEntrySize, RTFSOBJATTRADD_NOTHING, RTPATH_F_FOLLOW_LINK);
         if (rc == VERR_NO_MORE_FILES)
             break;
@@ -1532,5 +1532,5 @@
             pDirEntry = pDirEntryOrg;
 
-            rc = RTDirReadEx(DirHandle, pDirEntry, &cbDirEntrySize, RTFSOBJATTRADD_NOTHING);
+            rc = RTDirReadEx(DirHandle, pDirEntry, &cbDirEntrySize, RTFSOBJATTRADD_NOTHING, RTPATH_F_FOLLOW_LINK);
             if (rc == VERR_NO_MORE_FILES)
             {
Index: trunk/src/VBox/Runtime/r3/linux/sysfs.cpp
===================================================================
--- trunk/src/VBox/Runtime/r3/linux/sysfs.cpp	(revision 25291)
+++ trunk/src/VBox/Runtime/r3/linux/sysfs.cpp	(revision 25292)
@@ -402,5 +402,5 @@
         {
             RTDIRENTRYEX Entry;
-            rc = RTDirReadEx(pDir, &Entry, NULL, RTFSOBJATTRADD_UNIX);
+            rc = RTDirReadEx(pDir, &Entry, NULL, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
             if (RT_FAILURE(rc))
             {
@@ -413,5 +413,5 @@
                 break;
             }
-            if (RTFS_IS_SYMLINK(Entry.Info.Attr.fMode)) /* paranoia */
+            if (RTFS_IS_SYMLINK(Entry.Info.Attr.fMode)) /* paranoia. @todo RTDirReadEx now returns symlinks, see also #if 1 below. */
                 continue;
 
Index: trunk/src/VBox/Runtime/r3/posix/dir-posix.cpp
===================================================================
--- trunk/src/VBox/Runtime/r3/posix/dir-posix.cpp	(revision 25291)
+++ trunk/src/VBox/Runtime/r3/posix/dir-posix.cpp	(revision 25292)
@@ -389,5 +389,5 @@
 
 
-RTDECL(int) RTDirReadEx(PRTDIR pDir, PRTDIRENTRYEX pDirEntry, size_t *pcbDirEntry, RTFSOBJATTRADD enmAdditionalAttribs)
+RTDECL(int) RTDirReadEx(PRTDIR pDir, PRTDIRENTRYEX pDirEntry, size_t *pcbDirEntry, RTFSOBJATTRADD enmAdditionalAttribs, uint32_t fFlags)
 {
     /*
@@ -401,4 +401,5 @@
                     ("Invalid enmAdditionalAttribs=%p\n", enmAdditionalAttribs),
                     VERR_INVALID_PARAMETER);
+    AssertMsgReturn(RTPATH_F_IS_VALID(fFlags, 0), ("%#x\n", fFlags), VERR_INVALID_PARAMETER);
     size_t cbDirEntry = sizeof(*pDirEntry);
     if (pcbDirEntry)
@@ -448,5 +449,5 @@
                 memcpy(pszNamePath, pDir->pszPath, pDir->cchPath);
                 memcpy(pszNamePath + pDir->cchPath, pszName, cchName + 1);
-                rc = RTPathQueryInfo(pszNamePath, &pDirEntry->Info, enmAdditionalAttribs);
+                rc = RTPathQueryInfoEx(pszNamePath, &pDirEntry->Info, enmAdditionalAttribs, fFlags);
             }
             else
Index: trunk/src/VBox/Runtime/r3/win/dir-win.cpp
===================================================================
--- trunk/src/VBox/Runtime/r3/win/dir-win.cpp	(revision 25291)
+++ trunk/src/VBox/Runtime/r3/win/dir-win.cpp	(revision 25292)
@@ -310,6 +310,8 @@
 
 
-RTDECL(int) RTDirReadEx(PRTDIR pDir, PRTDIRENTRYEX pDirEntry, size_t *pcbDirEntry, RTFSOBJATTRADD enmAdditionalAttribs)
-{
+RTDECL(int) RTDirReadEx(PRTDIR pDir, PRTDIRENTRYEX pDirEntry, size_t *pcbDirEntry, RTFSOBJATTRADD enmAdditionalAttribs, uint32_t fFlags)
+{
+    /** @todo Symlinks: Find[First|Next]FileW will return info about
+        the link, so RTPATH_F_FOLLOW_LINK is not handled correctly. */
     /*
      * Validate input.
@@ -331,4 +333,5 @@
         return VERR_INVALID_PARAMETER;
     }
+    AssertMsgReturn(RTPATH_F_IS_VALID(fFlags, 0), ("%#x\n", fFlags), VERR_INVALID_PARAMETER);
     size_t cbDirEntry = sizeof(*pDirEntry);
     if (pcbDirEntry)
Index: trunk/src/VBox/Runtime/testcase/tstDir.cpp
===================================================================
--- trunk/src/VBox/Runtime/testcase/tstDir.cpp	(revision 25291)
+++ trunk/src/VBox/Runtime/testcase/tstDir.cpp	(revision 25292)
@@ -33,4 +33,5 @@
 #include <iprt/stream.h>
 #include <iprt/err.h>
+#include <iprt/path.h>
 //#include <iprt/
 
@@ -106,5 +107,5 @@
                     {
                         RTDIRENTRYEX DirEntry;
-                        rc = RTDirReadEx(pDir, &DirEntry, NULL, RTFSOBJATTRADD_UNIX);
+                        rc = RTDirReadEx(pDir, &DirEntry, NULL, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
                         if (RT_FAILURE(rc))
                             break;
