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

Commit 63131439 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Add support of directory copy"

parents 61a7b9f0 6de16604
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -45,6 +45,8 @@ public:
                                            MtpObjectFormat format,
                                            bool succeeded) = 0;

    virtual void                    doScanDirectory(const char* path) = 0;

    virtual MtpObjectHandleList*    getObjectList(MtpStorageID storageID,
                                            MtpObjectFormat format,
                                            MtpObjectHandle parent) = 0;
+3 −0
Original line number Diff line number Diff line
@@ -1148,6 +1148,7 @@ MtpResponseCode MtpServer::doCopyObject() {
    ALOGV("Copying file from %s to %s", (const char*)fromPath, (const char*)path);
    if (format == MTP_FORMAT_ASSOCIATION) {
        int ret = makeFolder((const char *)path);
        ret += copyRecursive(fromPath, path);
        if (ret) {
            result = MTP_RESPONSE_GENERAL_ERROR;
        }
@@ -1158,6 +1159,8 @@ MtpResponseCode MtpServer::doCopyObject() {
    }

    mDatabase->endSendObject(path, handle, format, result);
    if (format == MTP_FORMAT_ASSOCIATION)
        mDatabase->doScanDirectory(path);
    mResponse.setParameter(1, handle);
    return result;
}