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

Commit feafefb1 authored by Mike Lockwood's avatar Mike Lockwood
Browse files

MTP: check for replacing existing files via the database instead of the file system



Change-Id: I283dab48f24d2836e48fab8e49764a9cdf13de55
Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
parent 985f8389
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -683,10 +683,6 @@ MtpResponseCode MtpServer::doSendObjectInfo() {
        path += "/";
    path += (const char *)name;

    // file should not already exist
    if (access(path, R_OK) == 0)
        return MTP_RESPONSE_GENERAL_ERROR;

    // check space first
    if (mSendObjectFileSize > storage->getFreeSpace())
        return MTP_RESPONSE_STORAGE_FULL;