VirtualBox

Changeset 106038 in vbox for trunk/src/VBox/Main/src-server


Ignore:
Timestamp:
Sep 12, 2024 3:34:59 PM (6 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
164787
Message:

Main/Snapshot: Prevent stray <vmname>.nvram files from accumulating in
the 'Snapshots' directory when taking a snapshot of a VM which currently
uses BIOS but also has a <vmname>.nvram file present. The snapshot code
would include the file with the snapshot during IMachine::takeSnapshot()
since it was present in the VM directory but IMachine::deleteSnapshot()
would only delete it if the snapshot was of a VM using EFI. Fixed by
excluding the <vmname>.nvram file from the snapshot directory during
IMachine::takeSnapshot() if the VM uses BIOS.

File:
1 edited

Legend:

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

    r105605 r106038  
    19231923        Utf8Str strNVRAM = mNvramStore->i_getNonVolatileStorageFile();
    19241924        Utf8Str strNVRAMSnap = pSnapshotMachine->i_getSnapshotNVRAMFilename();
    1925         if (strNVRAM.isNotEmpty() && strNVRAMSnap.isNotEmpty() && RTFileExists(strNVRAM.c_str()))
     1925        if (   strNVRAM.isNotEmpty()
     1926            && strNVRAMSnap.isNotEmpty()
     1927            && RTFileExists(strNVRAM.c_str())
     1928            && mFirmwareSettings->i_getFirmwareType() != FirmwareType_BIOS)
    19261929        {
    19271930            Utf8Str strNVRAMSnapAbs;
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