Changeset 85282 in vbox
- Timestamp:
- Jul 12, 2020 2:53:50 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/ApplianceImpl.cpp
r84532 r85282 982 982 } 983 983 984 HRESULT Appliance::i_ searchUniqueImageFilePath(const Utf8Str &aMachineFolder, DeviceType_T aDeviceType, Utf8Str &aName) const984 HRESULT Appliance::i_ensureUniqueImageFilePath(const Utf8Str &aMachineFolder, DeviceType_T aDeviceType, Utf8Str &aName) const 985 985 { 986 986 /* … … 988 988 */ 989 989 Utf8Str strAbsName; 990 s size_t offDashNum = -1;991 s size_tcchDashNum = 0;990 size_t offDashNum = ~(size_t)0; 991 size_t cchDashNum = 0; 992 992 for (unsigned i = 1;; i++) 993 993 { … … 1007 1007 1008 1008 /* Insert '_%i' before the suffix and try again. */ 1009 if (offDashNum <0)1009 if (offDashNum == ~(size_t)0) 1010 1010 { 1011 1011 const char *pszSuffix = RTPathSuffix(aName.c_str()); 1012 offDashNum = pszSuffix ? pszSuffix - aName.c_str() : aName.length();1012 offDashNum = pszSuffix ? (size_t)(pszSuffix - aName.c_str()) : aName.length(); 1013 1013 } 1014 1014 char szTmp[32];
Note:
See TracChangeset
for help on using the changeset viewer.