VirtualBox

Changeset 37590 in vbox


Ignore:
Timestamp:
Jun 22, 2011 1:32:27 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
72434
Message:

Main-CloneVM: create the snapshot folder when necessary

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp

    r37580 r37590  
    707707            rc = pNewParent->addRegistry(d->pTrgMachine->mData->mUuid, true /* fRecursive */);
    708708            if (FAILED(rc)) throw rc;
     709        }
     710        /* Check if a snapshot folder is necessary and if so doesn't already
     711         * exists. */
     712        if (   !d->llSaveStateFiles.isEmpty()
     713            && !RTDirExists(strTrgSnapshotFolder.c_str()))
     714        {
     715            int vrc = RTDirCreateFullPath(strTrgSnapshotFolder.c_str(), 0777);
     716            if (RT_FAILURE(vrc))
     717                throw p->setError(VBOX_E_IPRT_ERROR,
     718                                  p->tr("Could not create snapshots folder '%s' (%Rrc)"), strTrgSnapshotFolder.c_str(), vrc);
    709719        }
    710720        /* Clone all save state files. */
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