VirtualBox

Changeset 62047 in vbox for trunk


Ignore:
Timestamp:
Jul 6, 2016 11:14:19 AM (9 years ago)
Author:
vboxsync
Message:

bugref:8344. small improvement. Always uses original extension of image.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/MediumImpl.cpp

    r61910 r62047  
    30353035                    destMediumPath = sourceMediumPath.stripFilename().append(RTPATH_SLASH).append(destMediumFileName);
    30363036                }
    3037                 else
     3037                suffix = i_getFormat();
     3038
     3039                if (suffix.compare("RAW", Utf8Str::CaseInsensitive) == 0)
    30383040                {
    3039                     /* set the target extension like on the source. Permission to convert is prohibited */
    3040                     suffix = i_getFormat();
    3041 
    3042                     if (suffix.compare("RAW", Utf8Str::CaseInsensitive) == 0)
     3041                    if(i_getDeviceType() == DeviceType_DVD)
    30433042                    {
    3044                         if(i_getDeviceType() == DeviceType_DVD)
    3045                         {
    3046                             suffix = "iso";
    3047                         }
    3048                         else
    3049                         {
    3050                             rc = setError(VERR_NOT_A_FILE,
    3051                                    tr("Medium '%s' has RAW type. \"Move\" operation isn't supported for this type."),
    3052                                    i_getLocationFull().c_str());
    3053                             throw rc;
    3054                         }
     3043                        suffix = "iso";
    30553044                    }
    3056 
    3057                     suffix.toLower();
    3058                     destMediumPath.stripSuffix().append('.').append(suffix);
     3045                    else
     3046                    {
     3047                        rc = setError(VERR_NOT_A_FILE,
     3048                               tr("Medium '%s' has RAW type. \"Move\" operation isn't supported for this type."),
     3049                               i_getLocationFull().c_str());
     3050                        throw rc;
     3051                    }
    30593052                }
     3053                /* set the target extension like on the source. Any conversions are prohibited */
     3054                suffix.toLower();
     3055                destMediumPath.stripSuffix().append('.').append(suffix);
    30603056            }
    30613057
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette