[vbox-dev] Setting IMachine::snapshotFolder to "." no longer works in VBox 4
Benjamin Gilbert
bgilbert at cs.cmu.edu
Tue Feb 22 16:45:25 PST 2011
Hello,
In VBox 3.2 and earlier, IMachine::snapshotFolder could be set to "." to
store snapshots directly in the machine folder. If this is done under
current VBox, the Machine tag in the machine XML is written out without
any snapshotFolder attribute, causing the snapshotFolder to revert to
the default ("Snapshots") the next time the machine is loaded.
The cause appears to be the fact that the SnapshotFolder COMSETTER now
uses copyPathRelativeToMachine() to calculate the relative path to be
stored in the MachineUserData from the absolute path to the snapshot
folder. If the path passed to copyPathRelativeToMachine() is equal to
the machine folder, copyPathRelativeToMachine() incorrectly returns a
zero-length string rather than ".". This causes the settings writer not
to write the attribute.
--Benjamin Gilbert
More information about the vbox-dev
mailing list