Changeset 49039 in vbox for trunk/src/VBox/Storage/VMDK.cpp
- Timestamp:
- Oct 10, 2013 6:27:32 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Storage/VMDK.cpp
r48860 r49039 3429 3429 char pszPartition[1024]; 3430 3430 const char *pszBase = RTPathFilename(pImage->pszFilename); 3431 const char *psz Ext = RTPathExt(pszBase);3432 if (psz Ext== NULL)3431 const char *pszSuff = RTPathSuffix(pszBase); 3432 if (pszSuff == NULL) 3433 3433 return vdIfError(pImage->pIfError, rc, RT_SRC_POS, N_("VMDK: invalid filename '%s'"), pImage->pszFilename); 3434 3434 char *pszBaseBase = RTStrDup(pszBase); 3435 3435 if (!pszBaseBase) 3436 3436 return VERR_NO_MEMORY; 3437 RTPathStrip Ext(pszBaseBase);3437 RTPathStripSuffix(pszBaseBase); 3438 3438 RTStrPrintf(pszPartition, sizeof(pszPartition), "%s-pt%s", 3439 pszBaseBase, psz Ext);3439 pszBaseBase, pszSuff); 3440 3440 RTStrFree(pszBaseBase); 3441 3441 … … 3627 3627 else 3628 3628 { 3629 char *pszBasename Ext = RTPathExt(pszBasenameSubstr);3629 char *pszBasenameSuff = RTPathSuffix(pszBasenameSubstr); 3630 3630 char *pszBasenameBase = RTStrDup(pszBasenameSubstr); 3631 RTPathStrip Ext(pszBasenameBase);3631 RTPathStripSuffix(pszBasenameBase); 3632 3632 char *pszTmp; 3633 3633 size_t cbTmp; … … 3636 3636 if (cExtents == 1) 3637 3637 RTStrAPrintf(&pszTmp, "%s-flat%s", pszBasenameBase, 3638 pszBasename Ext);3638 pszBasenameSuff); 3639 3639 else 3640 3640 RTStrAPrintf(&pszTmp, "%s-f%03d%s", pszBasenameBase, 3641 i+1, pszBasename Ext);3641 i+1, pszBasenameSuff); 3642 3642 } 3643 3643 else 3644 3644 RTStrAPrintf(&pszTmp, "%s-s%03d%s", pszBasenameBase, i+1, 3645 pszBasename Ext);3645 pszBasenameSuff); 3646 3646 RTStrFree(pszBasenameBase); 3647 3647 if (!pszTmp) … … 5491 5491 /* Prepare both old and new base names used for string replacement. */ 5492 5492 pszNewBaseName = RTStrDup(RTPathFilename(pszFilename)); 5493 RTPathStrip Ext(pszNewBaseName);5493 RTPathStripSuffix(pszNewBaseName); 5494 5494 pszOldBaseName = RTStrDup(RTPathFilename(pImage->pszFilename)); 5495 RTPathStrip Ext(pszOldBaseName);5495 RTPathStripSuffix(pszOldBaseName); 5496 5496 /* Prepare both old and new full names used for string replacement. */ 5497 5497 pszNewFullName = RTStrDup(pszFilename); 5498 RTPathStrip Ext(pszNewFullName);5498 RTPathStripSuffix(pszNewFullName); 5499 5499 pszOldFullName = RTStrDup(pImage->pszFilename); 5500 RTPathStrip Ext(pszOldFullName);5500 RTPathStripSuffix(pszOldFullName); 5501 5501 5502 5502 /* --- Up to this point we have not done any damage yet. --- */
Note:
See TracChangeset
for help on using the changeset viewer.