MTP Fix rename in Windows

Change-Id: Ieef2fc16aac1da3d03908cfb285895954b42a14a
This commit is contained in:
Dees Troy
2014-09-04 15:00:57 +00:00
parent 53ea0a166c
commit 2e07c0493e
3 changed files with 8 additions and 1 deletions

View File

@@ -44,6 +44,12 @@ Node::Node() {
void Node::setMtpid(int aMtpid) { mtpid = aMtpid; }
void Node::setPath(std::string aPath) { path = aPath; }
void Node::rename(std::string aPath) {
path = aPath;
updateProperty(MTP_PROPERTY_OBJECT_FILE_NAME, 0, basename(aPath.c_str()), MTP_TYPE_STR);
updateProperty(MTP_PROPERTY_NAME, 0, basename(aPath.c_str()), MTP_TYPE_STR);
updateProperty(MTP_PROPERTY_DISPLAY_NAME, 0, basename(aPath.c_str()), MTP_TYPE_STR);
}
void Node::setLeft(Node* aLeft) { left = aLeft; }
void Node::setRight(Node* aRight) { right = aRight; }
void Node::setParent(Node* aParent) { parent = aParent; }