VirtualBox

Ignore:
Timestamp:
Nov 7, 2022 7:44:16 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
154431
Message:

Guest Control/Main: Resolved a @todo: Removed the escaping stuff from GuestPath::Translate() and only remove (clean up) double slashes according to the destination's path style. Also, don't force any path conversions when source path style == dest path style, as this would lose (i.e. forcefully get converted) stuff which actually would be valid ('\' in UNIX paths, for instance). ​bugref:10286

File:
1 edited

Legend:

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

    r97425 r97426  
    17261726
    17271727                /* Clean up the final guest source path (for cleaning up mixed path separators). */
    1728                 vrc = GuestPath::Translate(strSrcAbs, pList->mSourceSpec.enmPathStyle /* Source */, pList->mSourceSpec.enmPathStyle /* Dest */,
    1729                                            true /* fForce */);
     1728                vrc = GuestPath::Translate(strSrcAbs, pList->mSourceSpec.enmPathStyle /* Source */,
     1729                                           pList->mSourceSpec.enmPathStyle /* Dest */);
    17301730                if (RT_FAILURE(vrc))
    17311731                {
     
    17371737
    17381738                /* Translate the final host destination path. */
    1739                 vrc = GuestPath::Translate(strDstAbs, PATH_STYLE_NATIVE /* Source */, PATH_STYLE_NATIVE /* Dest */, true /* fForce */);
     1739                vrc = GuestPath::Translate(strDstAbs, PATH_STYLE_NATIVE /* Source */, PATH_STYLE_NATIVE /* Dest */);
    17401740                if (RT_FAILURE(vrc))
    17411741                {
     
    20452045        /* Translate the destination path to a path compatible with the guest.
    20462046         * Note: This needs to be done *before* GuestPath::BuildDestinationPath() below! */
    2047         vrc = GuestPath::Translate(strDstRootAbs,
    2048                                    mSession->i_getGuestPathStyle() /* Source */, mSession->i_getGuestPathStyle() /* Dest */,
    2049                                    true /* fForce */);
     2047        vrc = GuestPath::Translate(strDstRootAbs, mSession->i_getGuestPathStyle() /* Source */,
     2048                                   mSession->i_getGuestPathStyle() /* Dest */);
    20502049
    20512050        GuestPath::BuildDestinationPath(strSrcRootAbs, PATH_STYLE_NATIVE,
     
    21612160            /* Clean up the final guest destination root path (for cleaning up mixed path separators). */
    21622161            vrc = GuestPath::Translate(strDstRootAbs,
    2163                                        mSession->i_getGuestPathStyle() /* Source */, mSession->i_getGuestPathStyle() /* Dest */,
    2164                                        true /* fForce */);
     2162                                       mSession->i_getGuestPathStyle() /* Source */, mSession->i_getGuestPathStyle() /* Dest */);
    21652163            if (RT_FAILURE(vrc))
    21662164            {
     
    21982196
    21992197                /* Clean up the final host source path (for cleaning up mixed path separators). */
    2200                 vrc = GuestPath::Translate(strSrcAbs,
    2201                                            PATH_STYLE_NATIVE /* Source */, PATH_STYLE_NATIVE /* Dest */,
    2202                                            true /* fForce */);
     2198                vrc = GuestPath::Translate(strSrcAbs, PATH_STYLE_NATIVE /* Source */, PATH_STYLE_NATIVE /* Dest */);
    22032199                if (RT_FAILURE(vrc))
    22042200                {
     
    22112207                /* Translate the final guest destination path. */
    22122208                vrc = GuestPath::Translate(strDstAbs,
    2213                                            mSession->i_getGuestPathStyle() /* Source */, mSession->i_getGuestPathStyle() /* Dest */,
    2214                                            true /* fForce */);
     2209                                           mSession->i_getGuestPathStyle() /* Source */, mSession->i_getGuestPathStyle() /* Dest */);
    22152210                if (RT_FAILURE(vrc))
    22162211                {
     
    23022297
    23032298            /* Cleanup the destination path. */
    2304             vrc = GuestPath::Translate(strDstRootAbs, mSession->i_getGuestPathStyle() /* Source */,
    2305                                        mSession->i_getGuestPathStyle() /* Dest */, true /* fForce */);
     2299            vrc = GuestPath::Translate(strDstRootAbs,
     2300                                       mSession->i_getGuestPathStyle() /* Source */,  mSession->i_getGuestPathStyle() /* Dest */);
    23062301            if (RT_FAILURE(vrc))
    23072302            {
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