Changeset 105018 in vbox for trunk/src/VBox/Main/xml
- Timestamp:
- Jun 25, 2024 11:06:29 AM (7 months ago)
- Location:
- trunk/src/VBox/Main/xml
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/xml/Settings.cpp
r105016 r105018 3793 3793 SharedFolder::SharedFolder() : 3794 3794 fWritable(false), 3795 fAutoMount(false), 3796 enmSymlinkPolicy(SymlinkPolicy_None) 3795 fAutoMount(false) 3797 3796 { 3798 3797 } … … 3810 3809 && fWritable == g.fWritable 3811 3810 && fAutoMount == g.fAutoMount 3812 && strAutoMountPoint == g.strAutoMountPoint 3813 && enmSymlinkPolicy == g.enmSymlinkPolicy); 3811 && strAutoMountPoint == g.strAutoMountPoint); 3814 3812 } 3815 3813 … … 5994 5992 pelmFolder->getAttributeValue("autoMount", sf.fAutoMount); 5995 5993 pelmFolder->getAttributeValue("autoMountPoint", sf.strAutoMountPoint); 5996 5997 Utf8Str strTemp;5998 if (pelmFolder->getAttributeValue("symlinkPolicy", strTemp))5999 {6000 if (strTemp == "forbidden")6001 sf.enmSymlinkPolicy = SymlinkPolicy_Forbidden;6002 else if (strTemp == "subtree")6003 sf.enmSymlinkPolicy = SymlinkPolicy_AllowedInShareSubtree;6004 else if (strTemp == "relative")6005 sf.enmSymlinkPolicy = SymlinkPolicy_AllowedToRelativeTargets;6006 else if (strTemp == "any")6007 sf.enmSymlinkPolicy = SymlinkPolicy_AllowedToAnyTarget;6008 else6009 throw ConfigFileError(this,6010 pelmHwChild,6011 N_("Invalid value '%s' in SharedFolder/@symlinkPolicy attribute"),6012 strTemp.c_str());6013 }6014 5994 hw.llSharedFolders.push_back(sf); 6015 5995 } … … 8329 8309 if (sf.strAutoMountPoint.isNotEmpty()) 8330 8310 pelmThis->setAttribute("autoMountPoint", sf.strAutoMountPoint); 8331 const char *pcszSymlinkPolicy;8332 if (sf.enmSymlinkPolicy != SymlinkPolicy_None)8333 {8334 switch (sf.enmSymlinkPolicy)8335 {8336 default: /*case SymlinkPolicy_Forbidden:*/ pcszSymlinkPolicy = "forbidden"; break;8337 case SymlinkPolicy_AllowedInShareSubtree: pcszSymlinkPolicy = "subtree"; break;8338 case SymlinkPolicy_AllowedToRelativeTargets: pcszSymlinkPolicy = "relative"; break;8339 case SymlinkPolicy_AllowedToAnyTarget: pcszSymlinkPolicy = "any"; break;8340 }8341 pelmThis->setAttribute("symlinkPolicy", pcszSymlinkPolicy);8342 }8343 8311 } 8344 8312 } … … 9563 9531 return; 9564 9532 } 9565 9566 // VirtualBox 7.1 (settings v1.20) adds support for customizable control over Shared Folders symlink creation.9567 if (hardwareMachine.llSharedFolders.size())9568 {9569 for (SharedFoldersList::const_iterator it = hardwareMachine.llSharedFolders.begin();9570 it != hardwareMachine.llSharedFolders.end();9571 ++it)9572 {9573 if (it->enmSymlinkPolicy != SymlinkPolicy_None)9574 {9575 m->sv = SettingsVersion_v1_20;9576 return;9577 }9578 }9579 }9580 9533 } 9581 9534 -
trunk/src/VBox/Main/xml/VirtualBox-settings.xsd
r105016 r105018 301 301 <xsd:enumeration value="VBoxSVGA"/> 302 302 <xsd:enumeration value="QemuRamFB"/> 303 </xsd:restriction>304 </xsd:simpleType>305 306 <xsd:simpleType name="TSymlinkPolicy"> <!-- new since v1.20. -->307 <xsd:restriction base="xsd:token">308 <xsd:enumeration value="forbidden"/>309 <xsd:enumeration value="subtree"/>310 <xsd:enumeration value="relative"/>311 <xsd:enumeration value="any"/>312 303 </xsd:restriction> 313 304 </xsd:simpleType> … … 1314 1305 <xsd:attribute name="autoMount" type="xsd:boolean" default="false"/> 1315 1306 <xsd:attribute name="autoMountPoint" type="xsd:string"/> 1316 <xsd:attribute name="symlinkPolicy" type="TSymlinkPolicy" default="forbidden"/> <!-- new since v1.20. -->1317 1307 </xsd:complexType> 1318 1308
Note:
See TracChangeset
for help on using the changeset viewer.