VirtualBox

Changeset 71097 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Feb 22, 2018 9:43:25 AM (7 years ago)
Author:
vboxsync
Message:

bugref:8344. Added a simple check for existence of destination file before start any moving activity.

File:
1 edited

Legend:

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

    r71055 r71097  
    30423042                suffix.toLower();
    30433043                destPath.stripSuffix().append('.').append(suffix);
     3044            }
     3045
     3046            /* Simple check for existence */
     3047            if (RTFileExists(destPath.c_str()))
     3048            {
     3049                rc = setError(VBOX_E_FILE_ERROR,
     3050                              tr("The given path '%s' is an existing file. Delete or rename this file."),
     3051                              destPath.c_str());
     3052                throw rc;
    30443053            }
    30453054
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