Changeset 61604 in vbox for trunk/src/VBox
- Timestamp:
- Jun 9, 2016 8:02:03 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MediumImpl.cpp
r61541 r61604 2991 2991 destMediumFileName.stripPath(); 2992 2992 2993 Utf8Str suffix(destMediumFileName); 2994 suffix.stripSuffix();//for small trick, see next condition 2995 2996 if(suffix.equals(destMediumFileName) && !destMediumFileName.isEmpty()) 2997 { 2998 /* 2999 * small trick. This case means target path has no filename at the end 3000 * it will look like "/path/to/new/location" 3001 * there is no backslash in the end 3002 * and there is no filename with extension(suffix) in the end 3003 * In this case just set destMediumFileName to NULL and 3004 * and add '/' in the end of path.destMediumPath 3005 */ 3006 destMediumFileName.setNull(); 3007 destMediumPath.append(RTPATH_SLASH); 3008 } 3009 2993 3010 if (destMediumFileName.isEmpty()) 2994 3011 { … … 3003 3020 * next move medium within the source directory with the passed new name 3004 3021 */ 3005 destMediumPath = sourceMediumPath.stripFilename().append( '/').append(destMediumFileName);3022 destMediumPath = sourceMediumPath.stripFilename().append(RTPATH_SLASH).append(destMediumFileName); 3006 3023 } 3007 3024 else 3008 3025 { 3009 3026 /* set the target extension like on the source. Permission to convert is prohibited */ 3010 Utf8Strsuffix = i_getFormat();3027 suffix = i_getFormat(); 3011 3028 3012 3029 if (suffix.compare("RAW", Utf8Str::CaseInsensitive) == 0)
Note:
See TracChangeset
for help on using the changeset viewer.