Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab26cfa4 authored by nolyn.lu's avatar nolyn.lu Committed by android-build-merger
Browse files

Merge "can't copy/paste folders on sdcard from PC side in MTP mode"

am: 130e1d19

Change-Id: Ia39d376be29dcd1b784dcfd402f8ae0ea63b1d69
parents 465a0b21 130e1d19
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@
#include "MtpServer.h"
#include "MtpStorage.h"
#include "MtpStringBuffer.h"
#include "android-base/strings.h"

namespace android {

@@ -955,6 +956,11 @@ MtpResponseCode MtpServer::doSendObjectInfo() {
    if (!mData.getString(modified)) return MTP_RESPONSE_INVALID_PARAMETER;     // date modified
    // keywords follow

    int type = storage->getType();
    if (type == MTP_STORAGE_REMOVABLE_RAM) {
        std::string str = android::base::Trim((const char*)name);
        name.set(str.c_str());
    }
    ALOGV("name: %s format: 0x%04X (%s)\n", (const char*)name, format,
          MtpDebug::getFormatCodeName(format));
    time_t modifiedTime;