VirtualBox

Changeset 92912 in vbox


Ignore:
Timestamp:
Dec 15, 2021 8:08:43 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
148868
Message:

FE/Qt: bugref:9371. Fixing a bug related to file copy calls

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerGuestTable.cpp

    r92900 r92912  
    614614        return;
    615615    }
    616 
     616    QString strDirectoryFlags("CopyIntoExisting,Recursive,FollowLinks");
     617    QString strFileFlags;
    617618    foreach (const QString &strSource, sourcePaths)
    618619    {
     
    622623        {
    623624            /* If the source is an directory, make sure to add the appropriate flag to make copying work
    624              * into existing directories on the guest. This otherwise would fail (default). */
     625             * into existing directories on the guest. This otherwise would fail (default): */
    625626            if (RTFS_IS_DIRECTORY(ObjInfo.Attr.fMode))
    626             {
    627                 aFlags.append("CopyIntoExisting");
    628                 aFlags.append("Recursive");
    629                 aFlags.append("FollowLinks");
    630             }
    631             else /* Make sure to keep the vector in sync with the number of source items by adding an empty entry. */
    632                 aFlags.append("");
     627                aFlags << strDirectoryFlags;
     628            else
     629                aFlags << strFileFlags;
    633630        }
    634631        else
     
    679676    }
    680677
     678    QString strDirectoryFlags("CopyIntoExisting,Recursive,FollowLinks");
     679    QString strFileFlags;
    681680    foreach (const QString &strSource, sourcePaths)
    682681    {
     
    692691        }
    693692
    694         KFsObjType eType = fileType(fileInfo);
    695         if (eType == KFsObjType_Directory)
    696         {
    697             aFlags.append("CopyIntoExisting");
    698             aFlags.append("Recursive");
    699             aFlags.append("FollowLinks");
    700         }
    701         else /* Make sure to keep the vector in sync with the number of source items by adding an empty entry. */
    702             aFlags.append("");
     693        if (fileType(fileInfo) == KFsObjType_Directory)
     694            aFlags << strDirectoryFlags;
     695        else
     696            aFlags << strFileFlags;
    703697    }
    704698
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