Changeset 93230 in vbox
- Timestamp:
- Jan 14, 2022 2:04:20 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/posix/dir-posix.cpp
r93115 r93230 162 162 const char *pszStat = pszNativePath; 163 163 size_t cch = strlen(pszNativePath); 164 if (cch > 2 && pszNativePath[cch - 1] == '/')164 if (cch > 2 && RTPATH_IS_SLASH(pszNativePath[cch - 1])) 165 165 { 166 pszStat = pszFree = (char *)RTMemTmpAlloc(cch); 167 memcpy(pszFree, pszNativePath, cch); 168 do 169 pszFree[--cch] = '\0'; 170 while (cch > 2 && pszFree[cch - 1] == '/'); 166 pszFree = (char *)RTMemTmpAlloc(cch); 167 if (pszFree) 168 { 169 memcpy(pszFree, pszNativePath, cch); 170 do 171 pszFree[--cch] = '\0'; 172 while (cch > 2 && RTPATH_IS_SLASH(pszFree[cch - 1])); 173 pszStat = pszFree; 174 } 171 175 } 172 176
Note:
See TracChangeset
for help on using the changeset viewer.