VirtualBox

Ignore:
Timestamp:
Aug 30, 2019 5:25:50 PM (5 years ago)
Author:
vboxsync
Message:

vboximg-mount: Fixes, use RTVfsDirRewind to reset the directory handle to the beginning before reading the entries

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ImageMounter/vboximg-mount/vboximg-mount.cpp

    r80517 r80519  
    2424
    2525#define FUSE_USE_VERSION 27
    26 #if defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) || defined(RT_OS_FEEBSD)
     26#if defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)
    2727#   define UNIX_DERIVATIVE
    2828#endif
     
    316316                /* Retrieve the accessed volume and return the stat data. */
    317317                uint32_t idxVol;
    318                 int rcIprt = RTStrToUInt32Full(&pPathSplit->apszComps[1][5], 10, &idxVol);
     318                int rcIprt = RTStrToUInt32Full(&pPathSplit->apszComps[1][2], 10, &idxVol);
    319319                if (   rcIprt == VINF_SUCCESS
    320320                    && idxVol < g_cVolumes
     
    669669                    RTDIRENTRYEX DirEntry;
    670670
     671                    rcIprt = RTVfsDirRewind(hVfsDir); AssertRC(rcIprt);
    671672                    rcIprt = RTVfsDirReadEx(hVfsDir, &DirEntry, NULL, RTFSOBJATTRADD_NOTHING);
    672673                    while (RT_SUCCESS(rcIprt))
     
    675676                        rcIprt = RTVfsDirReadEx(hVfsDir, &DirEntry, NULL, RTFSOBJATTRADD_NOTHING);
    676677                    }
     678
    677679                    RTVfsDirRelease(hVfsDir);
    678680                    break;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette