VirtualBox

Changeset 34580 in vbox


Ignore:
Timestamp:
Dec 1, 2010 3:46:52 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
68375
Message:

cleanup fix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/VBoxExtPackHelperApp.cpp

    r34579 r34580  
    13491349
    13501350        /*
    1351          * Only directories which conform with our mangling and temporary
    1352          * install/uninstall naming scheme are candidates for cleaning.
     1351         * Only directories which conform with our temporary install/uninstall
     1352         * naming scheme are candidates for cleaning.
    13531353         */
    13541354        if (   RTFS_IS_DIRECTORY(Entry.Info.Attr.fMode)
     
    13561356            && strcmp(Entry.szName, "..") != 0)
    13571357        {
    1358             bool fTemporary = false;
    1359             bool fCandidate = VBoxExtPackIsValidMangledName(Entry.szName);
    1360             if (!fCandidate)
    1361             {
    1362                 char *pszMarker = strstr(Entry.szName, "-_-");
    1363                 if (   pszMarker
    1364                     && (   !strcmp(pszMarker, "-_-uninst")
    1365                         || !strncmp(pszMarker, "-_-inst", sizeof("-_-inst") - 1)))
    1366                 {
    1367                     *pszMarker = '\0';
    1368                     fCandidate = VBoxExtPackIsValidMangledName(Entry.szName);
    1369                     *pszMarker = '-';
    1370                     fTemporary = true;
    1371                 }
    1372             }
     1358            bool fCandidate = false;
     1359            char *pszMarker = strstr(Entry.szName, "-_-");
     1360            if (   pszMarker
     1361                && (   !strcmp(pszMarker, "-_-uninst")
     1362                    || !strncmp(pszMarker, "-_-inst", sizeof("-_-inst") - 1)))
     1363                fCandidate = VBoxExtPackIsValidMangledName(Entry.szName, pszMarker - &Entry.szName[0]);
    13731364            if (fCandidate)
    13741365            {
     
    13801371                if (RT_SUCCESS(rc))
    13811372                {
    1382                     RTEXITCODE rcExit2 = RemoveExtPackDir(szPath, fTemporary);
     1373                    RTEXITCODE rcExit2 = RemoveExtPackDir(szPath, true /*fTemporary*/);
    13831374                    if (rcExit2 == RTEXITCODE_SUCCESS)
    13841375                        RTMsgInfo("Successfully removed '%s'.", Entry.szName);
Note: See TracChangeset for help on using the changeset viewer.

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