VirtualBox

Ignore:
Timestamp:
Nov 4, 2022 11:17:21 AM (2 years ago)
Author:
vboxsync
Message:

Guest Control/Main: Rewrite of the path building and directory walking code for the copyFrom / copyTo guest session tasks, to (hopefully) have a cleaner structure. The new path building now also takes into account whether a destination has a trailing delimiter and then act accordingly (see rules in GuestPath::BuildDestinationPath()). Adjusted VBoxManage and FE/Qt to also reflect that; should now work as common tools like cp. Added new test cases and also re-enabled old ones which were disabled since quite a while (should pass now). ​bugref:10286

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp

    r97349 r97395  
    17501750        if (fRecursive && fIsDir) /* Only available for directories. Just ignore otherwise. */
    17511751            strCopyFlags += "Recursive,";
    1752         if (fIsDir)
    1753             strCopyFlags += "CopyIntoExisting,"; /* Implicit. */
    17541752        if (fFollow)
    17551753            strCopyFlags += "FollowLinks,";
    1756         if (fUpdate && !fIsDir)    /* Only affects files. */
     1754        if (fUpdate)    /* Only copy source files which are newer than the destination file. */
    17571755            strCopyFlags += "Update,";
    1758         if (fNoReplace && !fIsDir) /* Ditto. */
     1756        if (fNoReplace) /* Do not overwrite files. */
    17591757            strCopyFlags += "NoReplace,";
     1758        else if (!fNoReplace && fIsDir)
     1759            strCopyFlags += "CopyIntoExisting,"; /* Only copy into existing directories if "--no-replace" isn't specified. */
    17601760       aCopyFlags.push_back(Bstr(strCopyFlags).raw());
    17611761    }
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