VirtualBox

Changeset 51443 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 28, 2014 12:03:00 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
94004
Message:

Try clean up the -_-uninst directory if it already exists. Suggest vboxmanage cleanup if it continue to fail.

File:
1 edited

Legend:

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

    r48681 r51443  
    237237
    238238    rc = RTDirRename(pszExtPackDir, szExtPackUnInstDir, RTPATHRENAME_FLAGS_NO_REPLACE);
    239     if (RT_FAILURE(rc))
    240         return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to rename the extension pack directory: %Rrc", rc);
     239    if (rc == VERR_ALREADY_EXISTS)
     240    {
     241        /* Automatic cleanup and try again.  It's in theory possible that we're
     242           racing another cleanup operation here, so just ignore errors and try
     243           again. (There is no installation race due to the exclusive temporary
     244           installation directory.) */
     245        RemoveExtPackDir(szExtPackUnInstDir, false /*fTemporary*/);
     246        rc = RTDirRename(pszExtPackDir, szExtPackUnInstDir, RTPATHRENAME_FLAGS_NO_REPLACE);
     247    }
     248    if (RT_FAILURE(rc))
     249        return RTMsgErrorExit(RTEXITCODE_FAILURE,
     250                              "Failed to rename the extension pack directory: %Rrc\n"
     251                              "If the problem persists, try running the command: VBoxManage extpack cleanup", rc);
    241252
    242253    /* Recursively delete the directory content. */
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