Loading media/mtp/MtpServer.cpp +2 −8 Original line number Original line Diff line number Diff line Loading @@ -1062,10 +1062,6 @@ MtpResponseCode MtpServer::doMoveObject() { path += "/"; path += "/"; path += info.mName; path += info.mName; result = mDatabase->moveObject(objectHandle, parent, storageID, path); if (result != MTP_RESPONSE_OK) return result; if (info.mStorageID == storageID) { if (info.mStorageID == storageID) { ALOGV("Moving file from %s to %s", (const char*)fromPath, (const char*)path); ALOGV("Moving file from %s to %s", (const char*)fromPath, (const char*)path); if (rename(fromPath, path)) { if (rename(fromPath, path)) { Loading @@ -1092,10 +1088,8 @@ MtpResponseCode MtpServer::doMoveObject() { } } // If the move failed, undo the database change // If the move failed, undo the database change if (result != MTP_RESPONSE_OK) if (result == MTP_RESPONSE_OK) if (mDatabase->moveObject(objectHandle, info.mParent, info.mStorageID, result = mDatabase->moveObject(objectHandle, parent, storageID, path); fromPath) != MTP_RESPONSE_OK) ALOGE("Couldn't undo failed move"); return result; return result; } } Loading Loading
media/mtp/MtpServer.cpp +2 −8 Original line number Original line Diff line number Diff line Loading @@ -1062,10 +1062,6 @@ MtpResponseCode MtpServer::doMoveObject() { path += "/"; path += "/"; path += info.mName; path += info.mName; result = mDatabase->moveObject(objectHandle, parent, storageID, path); if (result != MTP_RESPONSE_OK) return result; if (info.mStorageID == storageID) { if (info.mStorageID == storageID) { ALOGV("Moving file from %s to %s", (const char*)fromPath, (const char*)path); ALOGV("Moving file from %s to %s", (const char*)fromPath, (const char*)path); if (rename(fromPath, path)) { if (rename(fromPath, path)) { Loading @@ -1092,10 +1088,8 @@ MtpResponseCode MtpServer::doMoveObject() { } } // If the move failed, undo the database change // If the move failed, undo the database change if (result != MTP_RESPONSE_OK) if (result == MTP_RESPONSE_OK) if (mDatabase->moveObject(objectHandle, info.mParent, info.mStorageID, result = mDatabase->moveObject(objectHandle, parent, storageID, path); fromPath) != MTP_RESPONSE_OK) ALOGE("Couldn't undo failed move"); return result; return result; } } Loading