- Timestamp:
- Apr 4, 2018 1:26:06 PM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime/guestctrl
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/guestctrl/UIGuestControlFileManager.h
r71645 r71654 129 129 130 130 #endif /* !___UIGuestControlFileManager_h___ */ 131 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/guestctrl/UIGuestControlFileTable.cpp
r71645 r71654 187 187 return QString(); 188 188 QString newPath(path); 189 /* Make sure for we dont have any trailing slashes: */189 /* Make sure for we dont have any trailing delimiters: */ 190 190 while (newPath.length() > 1 && newPath.at(newPath.length() - 1) == UIPathOperations::delimiter) 191 191 newPath.chop(1); 192 return newPath; 193 } 194 195 /* static */ QString UIPathOperations::addTrailingDelimiters 196 (const QString &path) 197 { 198 if (path.isNull() || path.isEmpty()) 199 return QString(); 200 QString newPath(path); 201 while (newPath.length() > 1 && newPath.at(newPath.length() - 1) != UIPathOperations::delimiter) 202 newPath += UIPathOperations::delimiter; 192 203 return newPath; 193 204 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/guestctrl/UIGuestControlFileTable.h
r71645 r71654 133 133 static QString removeMultipleDelimiters(const QString &path); 134 134 static QString removeTrailingDelimiters(const QString &path); 135 static QString addTrailingDelimiters(const QString &path); 135 136 static QString addStartDelimiter(const QString &path); 136 137 … … 334 335 335 336 #endif /* !___UIGuestControlFileTable_h___ */ 337 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/guestctrl/UIGuestFileTable.cpp
r71645 r71654 347 347 { 348 348 QVector<KFileCopyFlag> flags(KFileCopyFlag_FollowLinks); 349 /* API expects a full file path as destionation: */ 350 QString destinationFilePath = UIPathOperations::mergePaths(guestDestinationPath, UIPathOperations::getObjectName(hostSourcePath)); 349 QString destinationFilePath = UIPathOperations::addTrailingDelimiters(guestDestinationPath); 351 350 /** @todo listen to CProgress object to monitor copy operation: */ 352 /*CProgress comProgress =*/ m_comGuestSession.FileCopyToGuest(hostSourcePath, destinationFilePath, flags);351 /*CProgress comProgress =*/ m_comGuestSession.FileCopyToGuest(hostSourcePath, "/home/vbox/temp/", flags); 353 352 } 354 353 else if(hostFileInfo.isDir()) 355 354 { 356 QVector<KDirectoryCopyFlag> aFlags(KDirectoryCopyFlag_None/*CopyIntoExisting*/); 355 356 QVector<KDirectoryCopyFlag> aFlags(KDirectoryCopyFlag_CopyIntoExisting); 357 357 /** @todo listen to CProgress object to monitor copy operation: */ 358 358 /*CProgress comProgress = */ m_comGuestSession.DirectoryCopyToGuest(hostSourcePath, guestDestinationPath, aFlags); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/guestctrl/UIGuestFileTable.h
r71645 r71654 63 63 64 64 #endif /* !___UIGuestControlFileTable_h___ */ 65
Note:
See TracChangeset
for help on using the changeset viewer.