- Timestamp:
- Dec 15, 2021 8:25:52 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 148869
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/guestctrl
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerGuestTable.cpp
r92912 r92913 31 31 #include "UIErrorString.h" 32 32 #include "UIFileManager.h" 33 #include "UIFileManagerHostTable.h" 33 34 #include "UIFileManagerGuestTable.h" 34 35 #include "UIMessageCenter.h" … … 618 619 foreach (const QString &strSource, sourcePaths) 619 620 { 620 RTFSOBJINFO ObjInfo; 621 int vrc = RTPathQueryInfo(strSource.toStdString().c_str(), &ObjInfo, RTFSOBJATTRADD_NOTHING); 622 if (RT_SUCCESS(vrc)) 623 { 624 /* If the source is an directory, make sure to add the appropriate flag to make copying work 625 * into existing directories on the guest. This otherwise would fail (default): */ 626 if (RTFS_IS_DIRECTORY(ObjInfo.Attr.fMode)) 627 aFlags << strDirectoryFlags; 628 else 629 aFlags << strFileFlags; 630 } 621 KFsObjType enmFileType = UIFileManagerHostTable::fileType(strSource); 622 if (enmFileType == KFsObjType_Unknown) 623 emit sigLogOutput(QString("Querying information for host item %1 failed.").arg(strSource), m_strTableName, FileManagerLogType_Error); 624 /* If the source is an directory, make sure to add the appropriate flag to make copying work 625 * into existing directories on the guest. This otherwise would fail (default): */ 626 else if (enmFileType == KFsObjType_Directory) 627 aFlags << strDirectoryFlags; 631 628 else 632 emit sigLogOutput(QString("Querying information for host item \"%s\" failed with %Rrc").arg(strSource.toStdString().c_str(), vrc), 633 m_strTableName, FileManagerLogType_Error); 629 aFlags << strFileFlags; 634 630 } 635 631 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerHostTable.cpp
r92900 r92913 328 328 } 329 329 330 /* static */ KFsObjType UIFileManagerHostTable::fileType(const QFileInfo &fsInfo) 330 /* static */ 331 KFsObjType UIFileManagerHostTable::fileType(const QFileInfo &fsInfo) 331 332 { 332 333 if (!fsInfo.exists()) … … 340 341 else if (fsInfo.isDir()) 341 342 return KFsObjType_Directory; 342 343 343 return KFsObjType_Unknown; 344 } 345 346 /* static */ 347 KFsObjType UIFileManagerHostTable::fileType(const QString &strPath) 348 { 349 return fileType(QFileInfo(strPath)); 344 350 } 345 351 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerHostTable.h
r92860 r92913 39 39 UIFileManagerHostTable(UIActionPool *pActionPool, QWidget *pParent = 0); 40 40 static KFsObjType fileType(const QFileInfo &fsInfo); 41 static KFsObjType fileType(const QString &strPath); 41 42 42 43 protected:
Note:
See TracChangeset
for help on using the changeset viewer.