Changeset 24184 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- Oct 30, 2009 11:11:45 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp
r23973 r24184 254 254 255 255 /* check the outcome */ 256 if (!filename || (sizeMB == 0)) 256 if ( !filename 257 || sizeMB == 0) 257 258 return errorSyntax(USAGE_CREATEHD, "Parameters --filename and --size are required"); 259 260 /* check for filename extension */ 261 Utf8Str strName(filename); 262 if (!RTPathHaveExt(strName.c_str())) 263 { 264 Utf8Str strFormat(format); 265 if (strFormat.compare("vmdk", iprt::MiniString::CaseInsensitive) == 0) 266 strName.append(".vmdk"); 267 else if (strFormat.compare("vhd", iprt::MiniString::CaseInsensitive) == 0) 268 strName.append(".vhd"); 269 else 270 strName.append(".vdi"); 271 filename = Bstr(strName); 272 } 258 273 259 274 ComPtr<IMedium> hardDisk;
Note:
See TracChangeset
for help on using the changeset viewer.