- Timestamp:
- Feb 16, 2012 4:31:01 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 76309
- Location:
- trunk/src/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzd.cpp
r40153 r40156 314 314 /* Get machine directory: */ 315 315 QString strMachineFolder = fileInfo.absolutePath(); 316 QString strMachineBaseName = fileInfo. baseName();316 QString strMachineBaseName = fileInfo.completeBaseName(); 317 317 318 318 /* Try to create this machine directory (and it's predecessors): */ -
trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
r40153 r40156 1331 1331 * characters which need UTF-16 surrogate pairs for Windows's benefit. */ 1332 1332 RTUNICP aCpSet[] = 1333 { ' ', ' ', '(', ')', '-', ' -', '0', '9', 'A', 'Z', 'a', 'z', '_', '_',1333 { ' ', ' ', '(', ')', '-', '.', '0', '9', 'A', 'Z', 'a', 'z', '_', '_', 1334 1334 0xa0, 0xd7af, '\0' }; 1335 Assert(RTStrPurgeComplementSet(strName.mutableRaw(), aCpSet, '_') > 0); 1335 char *pszName = strName.mutableRaw(); 1336 Assert(RTStrPurgeComplementSet(pszName, aCpSet, '_') > 0); 1337 /* No leading dot or dash. */ 1338 if (pszName[0] == '.' || pszName[0] == '-') 1339 pszName[0] = '_'; 1340 /* No trailing dot. */ 1341 if (pszName[strName.length() - 1] == '.') 1342 pszName[strName.length() - 1] = '_'; 1343 /* Mangle leading and trailing spaces. */ 1344 for (size_t i = 0; pszName[i] == ' '; ++i) 1345 pszName[i] = '_'; 1346 for (size_t i = strName.length() - 1; i && pszName[i] == ' '; --i) 1347 pszName[i] = '_'; 1348 1336 1349 if (strBase.isEmpty()) 1337 1350 /* we use the non-full folder value below to keep the path relative */
Note:
See TracChangeset
for help on using the changeset viewer.