~ubuntu-branches/ubuntu/precise/virtualbox/precise-updates

« back to all changes in this revision

Viewing changes to src/VBox/Main/src-server/SnapshotImpl.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-10-17 23:23:09 UTC
  • mfrom: (3.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20111017232309-kzm6841lzk61ranj
Tags: 4.1.4-dfsg-1
* New upstream release.
  - Fixes missing icons when using pt_BR locale. (Closes: #507188)
  - Fixes guest additions download url. (Closes: #637349; LP: #840668)
* Refresh patches.
* Drop the vboxmouse x11 driver. The mouse integration is now completely
  handled by the kernel module.
* Restrict dh_pycentral to the virtualbox binary package.
* Merge changes from the Ubuntu package but use them only when built
  on Ubuntu:
  - Add an Apport hook.
  - Add vboxguest modalias to the package control field.
* Pass KBUILD_VERBOSE=2 to kmk.
* Add 36-fix-text-mode.patch to fix text mode when using the vboxvideo driver.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: SnapshotImpl.cpp 37985 2011-07-15 15:04:39Z vboxsync $ */
 
1
/* $Id: SnapshotImpl.cpp $ */
2
2
 
3
3
/** @file
4
4
 *
6
6
 */
7
7
 
8
8
/*
9
 
 * Copyright (C) 2006-2010 Oracle Corporation
 
9
 * Copyright (C) 2006-2011 Oracle Corporation
10
10
 *
11
11
 * This file is part of VirtualBox Open Source Edition (OSE), as
12
12
 * available from http://www.virtualbox.org. This file is free software;
1430
1430
    if (strStateFilePath.isNotEmpty())
1431
1431
    {
1432
1432
        // ensure the directory for the saved state file exists
1433
 
        HRESULT rc = VirtualBox::ensureFilePathExists(strStateFilePath);
 
1433
        HRESULT rc = VirtualBox::ensureFilePathExists(strStateFilePath, true /* fCreate */);
1434
1434
        if (FAILED(rc)) return rc;
1435
1435
    }
1436
1436
 
1819
1819
            // restore the attachments from the snapshot
1820
1820
            setModified(IsModified_Storage);
1821
1821
            mMediaData.backup();
1822
 
            mMediaData->mAttachments = pSnapshotMachine->mMediaData->mAttachments;
 
1822
            mMediaData->mAttachments.clear();
 
1823
            for (MediaData::AttachmentList::const_iterator it = pSnapshotMachine->mMediaData->mAttachments.begin();
 
1824
                 it != pSnapshotMachine->mMediaData->mAttachments.end();
 
1825
                 ++it)
 
1826
            {
 
1827
                ComObjPtr<MediumAttachment> pAttach;
 
1828
                pAttach.createObject();
 
1829
                pAttach->initCopy(this, *it);
 
1830
                mMediaData->mAttachments.push_back(pAttach);
 
1831
            }
1823
1832
 
1824
1833
            /* leave the locks before the potentially lengthy operation */
1825
1834
            snapshotLock.release();