summaryrefslogtreecommitdiffstats
path: root/mtp/node.cpp
diff options
context:
space:
mode:
authorDees Troy <dees_troy@teamw.in>2014-09-04 17:00:57 +0200
committerDees Troy <dees_troy@teamw.in>2014-09-04 17:01:30 +0200
commit2e07c0493e76f16b021d53280ee4fa49586bde46 (patch)
treeab58df42cfee6ebda5d5f70af924d66679bd1f15 /mtp/node.cpp
parentMTP Fix property list for multiple storage devices (diff)
downloadandroid_bootable_recovery-2e07c0493e76f16b021d53280ee4fa49586bde46.tar
android_bootable_recovery-2e07c0493e76f16b021d53280ee4fa49586bde46.tar.gz
android_bootable_recovery-2e07c0493e76f16b021d53280ee4fa49586bde46.tar.bz2
android_bootable_recovery-2e07c0493e76f16b021d53280ee4fa49586bde46.tar.lz
android_bootable_recovery-2e07c0493e76f16b021d53280ee4fa49586bde46.tar.xz
android_bootable_recovery-2e07c0493e76f16b021d53280ee4fa49586bde46.tar.zst
android_bootable_recovery-2e07c0493e76f16b021d53280ee4fa49586bde46.zip
Diffstat (limited to '')
-rwxr-xr-xmtp/node.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/mtp/node.cpp b/mtp/node.cpp
index a9c1f9bae..79936c4a4 100755
--- a/mtp/node.cpp
+++ b/mtp/node.cpp
@@ -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; }