VirtualBox

Changeset 38495 in vbox


Ignore:
Timestamp:
Aug 19, 2011 9:06:33 AM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
73593
Message:

Main: shared folder setup: reorder the path checks; if a shared folder not exists this should be reported first (otherwise the error is very misleading)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r37851 r38495  
    71347134
    71357135    // check whether the path is valid and exists
    7136     /* Check whether the path is full (absolute) */
    71377136    char hostPathFull[RTPATH_MAX];
    71387137    int vrc = RTPathAbsEx(NULL,
     
    71447143                        tr("Invalid shared folder path: '%s' (%Rrc)"),
    71457144                        aData.m_strHostPath.c_str(), vrc);
    7146 
     7145    if (!RTPathExists(hostPathFull))
     7146        return setError(E_INVALIDARG,
     7147                        tr("Shared folder path '%s' does not exist on the host"),
     7148                        aData.m_strHostPath.c_str());
     7149    /* Check whether the path is full (absolute) */
    71477150    if (RTPathCompare(aData.m_strHostPath.c_str(), hostPathFull) != 0)
    71487151        return setError(E_INVALIDARG,
    71497152                        tr("Shared folder path '%s' is not absolute"),
    7150                         aData.m_strHostPath.c_str());
    7151     if (!RTPathExists(hostPathFull))
    7152         return setError(E_INVALIDARG,
    7153                         tr("Shared folder path '%s' does not exist on the host"),
    71547153                        aData.m_strHostPath.c_str());
    71557154
Note: See TracChangeset for help on using the changeset viewer.

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