VirtualBox

Changeset 99073 in vbox for trunk


Ignore:
Timestamp:
Mar 20, 2023 5:34:02 PM (21 months ago)
Author:
vboxsync
Message:

Guest Control/Main: Always dereference symlinks by default when opening directories, as we want to show its contents rather than working directly on the link.

File:
1 edited

Legend:

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

    r98824 r99073  
    400400    /* We want the long output format which contains all the object details. */
    401401    procInfo.mArguments.push_back(Utf8Str("-l"));
    402 # if 0 /* Flags are not supported yet. */
    403     if (uFlags & DirectoryOpenFlag_NoSymlinks)
    404         procInfo.mArguments.push_back(Utf8Str("--nosymlinks")); /** @todo What does GNU here? */
    405 # endif
     402    /* Always dereference symlinks by default when opening directories, as we want to show its
     403     * contents rather than working directly on the link.
     404     *
     405     * Newer Linux distros such as Ubuntu 22.10 symlink /bin to /usr/bin, for example. */
     406    if (!(mData.mOpenInfo.mFlags & DirectoryOpenFlag_NoSymlinks)) /* Check if the caller explicitly forbids this. */
     407        procInfo.mArguments.push_back(Utf8Str("--dereference"));
    406408    /** @todo Recursion support? */
    407409    procInfo.mArguments.push_back(mData.mOpenInfo.mPath); /* The directory we want to open. */
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